-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tootctl preview_cards remove
#11320
Add tootctl preview_cards remove
#11320
Conversation
tootctl preview-cards remove
tootctl preview_cards remove
3997dc3
to
a4d4dd5
Compare
It might be possible to add a rate-limit system to Sidekiq jobs. While |
tootctl preview_cards remove
tootctl preview_cards remove
Add exclude case where image_file_name is blank
I think that it isn't happening on my server so far. |
…ys is less than 2 weeks
tootctl preview_cards remove
tootctl preview_cards remove
|
||
if time_ago > 2.weeks.ago | ||
prompt.say "\n" | ||
prompt.say('The preview cards less than the past two weeks will not be re-acquired even when needed.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this text easy to understand? I do not have any confidence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Media remove does not ask for confirmation. Do you think it's necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it is necessary.
In preview cards, I think that only those older than 2 weeks will be re-acquired.
https://github.com/tootsuite/mastodon/blob/master/app/services/fetch_link_card_service.rb#L25
On the other hand, I can not find the date limit for re-acquisition of attached media.
Therefore, I think that it is necessary to output a warning if the number of days less than 2 weeks is specified in this command.
* Add `tootctl preview_cards remove` * fix code style * Remove `Scheduler::PreviewCardsCleanupScheduler` file * fix code style again Add exclude case where image_file_name is blank * Added a function to output confirmation if the specified number of days is less than 2 weeks
option :link, type: :boolean, default: false | ||
desc 'remove', 'Remove preview cards' | ||
long_desc <<-DESC | ||
Removes locally thumbnails for previews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does locally thumbnails
means?
This changes will be change the remove thumbnails of previews from automatic execution by the Sidekiq scheduler to manual execution by the
tootctl
command.After #11304, object storage’s rate-limit is triggered when
Scheduler::PreviewCardsCleanupScheduler
is executed in some object storage environments.This is similar to #8187.
So I made
tootctl preview_cards remove
command referring totootctl media remove
.There are multiple
if
statements.I think that it is not a good writing style.
Please let me know if there is a better way of writing.
TODO