diff options
author | ThibG <thib@sitedethib.com> | 2020-03-08 22:09:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 22:09:53 +0100 |
commit | 840b17e3444f9a68d3639f1ffeb326e8cb1e03b1 (patch) | |
tree | 8254538ed33f4c4b974b5379f3b5a0b489ba095a /lib | |
parent | 13ef4d5fb0dbb66074f42df7989ae40509a4724f (diff) | |
parent | 9c2922958783f7e499cdda5bb874d6096e47eb0a (diff) |
Merge pull request #1297 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/statuses_cli.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mastodon/statuses_cli.rb b/lib/mastodon/statuses_cli.rb index 875183372..8a18a3b2f 100644 --- a/lib/mastodon/statuses_cli.rb +++ b/lib/mastodon/statuses_cli.rb @@ -14,6 +14,7 @@ module Mastodon option :days, type: :numeric, default: 90 option :clean_followed, type: :boolean + option :skip_media_remove, type: :boolean desc 'remove', 'Remove unreferenced statuses' long_desc <<~LONG_DESC Remove statuses that are not referenced by local user activity, such as @@ -58,9 +59,10 @@ module Mastodon scope.in_batches.delete_all - say('Beginning removal of now-orphaned media attachments to free up disk space...') - - Scheduler::MediaCleanupScheduler.new.perform + unless options[:skip_media_remove] + say('Beginning removal of now-orphaned media attachments to free up disk space...') + Scheduler::MediaCleanupScheduler.new.perform + end say("Done after #{Time.now.to_f - start_at}s", :green) ensure |