about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-27 13:23:02 +0100
committerThibaut Girka <thib@sitedethib.com>2018-11-27 13:23:02 +0100
commitf8e07ca5cdd0d4203d31aa5f0fce79690d5a5190 (patch)
tree928e06a97ccd3c3eeef3b3c0ac03c8f59d516e59 /lib
parent6b6e633c095485f95350c4308a942192e5fe8806 (diff)
parent496a6b3dc5274cca08fe58c1d9a7cdc7d10d325b (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/status.rb

Resolved by taking both changes (not a real conflict, just changes too close
to each other).
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/accounts_cli.rb3
-rw-r--r--lib/mastodon/media_cli.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 142436c19..9f7870bcd 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -242,8 +242,9 @@ module Mastodon
           end
 
           culled += 1
-          say('.', :green, false)
+          say('+', :green, false)
         else
+          account.touch # Touch account even during dry run to avoid getting the account into the window again
           say('.', nil, false)
         end
       end
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb
index 99660dd1d..6152d5a09 100644
--- a/lib/mastodon/media_cli.rb
+++ b/lib/mastodon/media_cli.rb
@@ -50,10 +50,10 @@ module Mastodon
       else
         MediaAttachment.where.not(remote_url: '').where.not(file_file_name: nil).where('created_at < ?', time_ago).reorder(nil).find_in_batches do |media_attachments|
           media_attachments.each do |m|
+            size += m.file_file_size || 0
             Maintenance::UncacheMediaWorker.new.perform(m) unless options[:dry_run]
             options[:verbose] ? say(m.id) : say('.', :green, false)
             processed += 1
-            size      += m.file_file_size || 0
           end
         end
       end