Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix Move handler not being triggered when failing to fetch target (ma…
Browse files Browse the repository at this point in the history
…stodon#15107)

When failing to fetch the target account, the ProcessingWorker fails
as expected, but since it hasn't cleared the `move_in_progress` flag,
the next attempt at processing skips the `Move` activity altogether.

This commit changes it to clear the flag when encountering any
unexpected error on fetching the target account. This is likely to
occur because, of, e.g., a timeout, when many instances query the
same actor at the same time.
  • Loading branch information
ClearlyClaire authored Nov 9, 2020
1 parent cc98f96 commit b089329
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/lib/activitypub/activity/move.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def perform

# Initiate a re-follow for each follower
MoveWorker.perform_async(origin_account.id, target_account.id)
rescue
unmark_as_processing!
raise
end

private
Expand Down

0 comments on commit b089329

Please sign in to comment.