diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/fetch_media_worker.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/workers/fetch_media_worker.rb b/app/workers/fetch_media_worker.rb index 02407db16..3e5eafb66 100644 --- a/app/workers/fetch_media_worker.rb +++ b/app/workers/fetch_media_worker.rb @@ -5,9 +5,10 @@ class FetchMediaWorker sidekiq_options queue: 'bulk', retry: 2 - def perform(media_attachment_id, remote_url = nil) + def perform(media_attachment_id, remote_url: nil, force: false) object = MediaAttachment.find(media_attachment_id.to_i) return if object.blocked? + return unless force || object.needs_redownload? if remote_url.nil? return if object.remote_url.nil? else |