Przeglądaj źródła

Fix "tootctl media remove" can't count the file size (#9288)

* Fixed an issue where "tootctl media remove" can not count the file size.

* Fixed the problem pointed out by codeclimate.
master
mayaeh 5 lat temu
committed by Eugen Rochko
rodzic
commit
8f7e3d3772
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      lib/mastodon/media_cli.rb

+ 1
- 1
lib/mastodon/media_cli.rb Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz