about summary refs log tree commit diff
path: root/app/workers/distribution_worker.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-19 09:31:12 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-19 09:31:12 +0100
commit4c6809f6ab7e5082eaf3a005246cbff6a110496d (patch)
tree17e9f50cb7533c676b21f0d74a3debe5f9e24898 /app/workers/distribution_worker.rb
parent0542773bca804868c8e4b45fe08f6041cb1b5851 (diff)
Adding some rescues to workers, e.g. don't fail removal job when status can't be found in the first place (already removed)
Diffstat (limited to 'app/workers/distribution_worker.rb')
-rw-r--r--app/workers/distribution_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/distribution_worker.rb b/app/workers/distribution_worker.rb
index 09374bee2..f423d43ae 100644
--- a/app/workers/distribution_worker.rb
+++ b/app/workers/distribution_worker.rb
@@ -5,5 +5,7 @@ class DistributionWorker
 
   def perform(status_id)
     FanOutOnWriteService.new.call(Status.find(status_id))
+  rescue ActiveRecord::RecordNotFound
+    true
   end
 end