Fix that can't delete media files even if "tootctl media remove" execute when "--background" not attached.
parent
5e1767173f
commit
5aa7e09645
|
@ -6,7 +6,7 @@ class Maintenance::UncacheMediaWorker
|
|||
sidekiq_options queue: 'pull'
|
||||
|
||||
def perform(media_attachment_id)
|
||||
media = media_attachment_id.is_a?(MediaAttachment) ? media_attachment_id : MediaAttachment.find(media_attachment_id)
|
||||
media = MediaAttachment.find(media_attachment_id)
|
||||
|
||||
return if media.file.blank?
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ module Mastodon
|
|||
Maintenance::UncacheMediaWorker.push_bulk(media_attachments.map(&:id))
|
||||
else
|
||||
media_attachments.each do |m|
|
||||
Maintenance::UncacheMediaWorker.new.perform(m)
|
||||
Maintenance::UncacheMediaWorker.new.perform(m.id)
|
||||
say('.', :green, false)
|
||||
processed += 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue