mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Adding some rescues to workers, e.g. don't fail removal job when status can't be found in the first place (already removed)
This commit is contained in:
parent
0542773bca
commit
4c6809f6ab
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user