-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 media remove-orphans
#12568
Conversation
Gargron
commented
Dec 8, 2019
5edff69
to
49a1dd4
Compare
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.
code lgtm % comments
@@ -89,7 +89,7 @@ | |||
Paperclip::Attachment.default_options.merge!( | |||
storage: :filesystem, | |||
use_timestamp: true, | |||
path: ENV.fetch('PAPERCLIP_ROOT_PATH', ':rails_root/public/system') + '/:class/:attachment/:id_partition/:style/:filename', | |||
path: File.join(ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')), ':class', ':attachment', ':id_partition', ':style', ':filename'), |
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.
*%w(:rails_root public system)
can clean up these arg lists
progress = create_progress_bar(nil) | ||
reclaimed_bytes = 0 | ||
removed = 0 | ||
dry_run = options[:dry_run] ? ' (DRY RUN)' : '' |
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.
maybe we should make this :destructive so it's opt in instead of opt out?
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.
or maybe we should gather all the files to delete, ask for confirmation, and then delete them
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.
I wouldn't do that because of memory implications if there are a lot of files as well as being able to interrupt the process while having some kind of tangible progress.
c3ef226
to
2bf3ecb
Compare
2bf3ecb
to
11a34e9
Compare
Thanks for this |