0
0
Fork 0

Fix Move handler queuing jobs that will fail if account is suspended (#11864)

Don't put Move handler on cooldown if it didn't run. Skip unmerging
from timelines to save unnecessary work.
This commit is contained in:
Eugen Rochko 2019-09-17 08:44:45 +02:00 committed by GitHub
parent c21386cff5
commit 38dc51b2d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 5 deletions

View file

@ -11,7 +11,7 @@ class UnfollowFollowWorker
new_target_account = Account.find(new_target_account_id)
FollowService.new.call(follower_account, new_target_account)
UnfollowService.new.call(follower_account, old_target_account)
UnfollowService.new.call(follower_account, old_target_account, skip_unmerge: true)
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
true
end