From 1070804a1a6121170f7bba923789d73b978e6fe7 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 12 Jan 2024 18:00:17 +0100 Subject: [PATCH] Fix `RedownloadMediaWorker` not being called on transient S3 failure (#28714) --- app/lib/activitypub/activity/create.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index f6262899a8..5a2d33c1fa 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -283,6 +283,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity RedownloadMediaWorker.perform_in(rand(30..600).seconds, media_attachment.id) rescue Seahorse::Client::NetworkingError => e Rails.logger.warn "Error storing media attachment: #{e}" + RedownloadMediaWorker.perform_async(media_attachment.id) end end