Skip to content
Snippets Groups Projects
Commit 4c6809f6 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Adding some rescues to workers, e.g. don't fail removal job when status can't...

Adding some rescues to workers, e.g. don't fail removal job when status can't be found in the first place (already removed)
parent 0542773b
No related branches found
No related tags found
No related merge requests found
......@@ -5,5 +5,7 @@ class DistributionWorker
def perform(status_id)
FanOutOnWriteService.new.call(Status.find(status_id))
rescue ActiveRecord::RecordNotFound
true
end
end
......@@ -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
......@@ -5,5 +5,7 @@ class RemovalWorker
def perform(status_id)
RemoveStatusService.new.call(Status.find(status_id))
rescue ActiveRecord::RecordNotFound
true
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment