about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorStarfall <admin@plural.cafe>2020-05-15 18:30:58 -0500
committerStarfall <admin@plural.cafe>2020-05-15 18:30:58 -0500
commit3f6370500cd8bf04fab9c9d8f3099271126a3097 (patch)
tree7215e9562c06435f9e6464fee2aa0185dd108a34 /app/workers
parentca3af6c5b00be851e2ced9112429cfc1baa79529 (diff)
parentb7e178d2e4102bdaa1ea41dfd8ed50093cf3f60a (diff)
Update to Mastodon 3.1.4 / Merge branch 'glitch'
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/activitypub/delivery_worker.rb10
-rw-r--r--app/workers/redownload_media_worker.rb2
2 files changed, 4 insertions, 8 deletions
diff --git a/app/workers/activitypub/delivery_worker.rb b/app/workers/activitypub/delivery_worker.rb
index 14e37dc34..60775787a 100644
--- a/app/workers/activitypub/delivery_worker.rb
+++ b/app/workers/activitypub/delivery_worker.rb
@@ -52,13 +52,9 @@ class ActivityPub::DeliveryWorker
       end
     end
 
-    begin
-      light.with_threshold(STOPLIGHT_FAILURE_THRESHOLD)
-           .with_cool_off_time(STOPLIGHT_COOLDOWN)
-           .run
-    rescue Stoplight::Error::RedLight => e
-      raise e.class, e.message, e.backtrace.first(3)
-    end
+    light.with_threshold(STOPLIGHT_FAILURE_THRESHOLD)
+         .with_cool_off_time(STOPLIGHT_COOLDOWN)
+         .run
   end
 
   def failure_tracker
diff --git a/app/workers/redownload_media_worker.rb b/app/workers/redownload_media_worker.rb
index 98e995918..071501a49 100644
--- a/app/workers/redownload_media_worker.rb
+++ b/app/workers/redownload_media_worker.rb
@@ -11,7 +11,7 @@ class RedownloadMediaWorker
 
     return if media_attachment.remote_url.blank?
 
-    media_attachment.reset_file!
+    media_attachment.file_remote_url = media_attachment.remote_url
     media_attachment.save
   rescue ActiveRecord::RecordNotFound
     true