diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-09-14 17:42:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 17:42:22 +0200 |
commit | 6a3f9b7e53e4cef0b5406676d56e904a02716ee6 (patch) | |
tree | a2bffb6c09262d4fb29ac406095824635fd14172 /lib/mastodon/media_cli.rb | |
parent | 1d8b693d31512b25f90d63b5d879d97dba4044fe (diff) |
Move more tasks to tootctl (#8675)
* Move more tasks to tootctl - tootctl feeds build - tootctl feeds clear - tootctl accounts refresh Clean up exit codes and help messages * Move user modifying to tootctl * Improve user modification through CLI, rename commands add -> create mod -> modify del -> delete To remove ambiguity * Fix code style issues * Fix not being able to unset admin/mod role
Diffstat (limited to 'lib/mastodon/media_cli.rb')
-rw-r--r-- | lib/mastodon/media_cli.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 12ebdb774..8aa9f7903 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -4,8 +4,6 @@ require_relative '../../config/boot' require_relative '../../config/environment' require_relative 'cli_helper' -# rubocop:disable Rails/Output - module Mastodon class MediaCLI < Thor option :days, type: :numeric, default: 7 @@ -25,9 +23,10 @@ module Mastodon it may impact other operations of the Mastodon server, and it may overload the underlying file storage. - With the --verbose option, output deleting file ID to console (only when --background false). + With the --dry-run option, no work will be done. - With the --dry-run option, output the number of files to delete without deleting. + With the --verbose option, when media attachments are processed sequentially in the + foreground, the IDs of the media attachments will be printed. DESC def remove time_ago = options[:days].days.ago @@ -53,12 +52,10 @@ module Mastodon say if options[:background] - say("Scheduled the deletion of #{queued} media attachments #{dry_run}.", :green) + say("Scheduled the deletion of #{queued} media attachments #{dry_run}", :green, true) else - say("Removed #{processed} media attachments #{dry_run}.", :green) + say("Removed #{processed} media attachments #{dry_run}", :green, true) end end end end - -# rubocop:enable Rails/Output |