diff --git a/app/workers/distribution_worker.rb b/app/workers/distribution_worker.rb index 09374bee293e1be91c8bed56158cde1c77f6a86c..f423d43ae58df1cccd560153b368e7f6e4c78e03 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 diff --git a/app/workers/pubsubhubbub/distribution_worker.rb b/app/workers/pubsubhubbub/distribution_worker.rb index b0ddc71c1c1e39b5c1ba092bde7cbc5edb4c65f4..e88d11be0a806daacfe53d4444f44f504454a9b4 100644 --- a/app/workers/pubsubhubbub/distribution_worker.rb +++ b/app/workers/pubsubhubbub/distribution_worker.rb @@ -14,5 +14,7 @@ class Pubsubhubbub::DistributionWorker Subscription.where(account: account).active.select('id').find_each do |subscription| Pubsubhubbub::DeliveryWorker.perform_async(subscription.id, payload) end + rescue ActiveRecord::RecordNotFound + true end end diff --git a/app/workers/removal_worker.rb b/app/workers/removal_worker.rb index eae27c66fa0aea7098119ddcbf8e4441a122d12e..19a660dd3e0190f19a6cfab2bc7389b3c57606ef 100644 --- a/app/workers/removal_worker.rb +++ b/app/workers/removal_worker.rb @@ -5,5 +5,7 @@ class RemovalWorker def perform(status_id) RemoveStatusService.new.call(Status.find(status_id)) + rescue ActiveRecord::RecordNotFound + true end end