mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Fix that can't delete media files even if "tootctl media remove" execute when "--background" not attached.
This commit is contained in:
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
Block a user