mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Change activity distribution error handling to skip retrying for deleted accounts (#33617)
This commit is contained in:
parent
db08632554
commit
f1a6cca2e1
1 changed files with 5 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ class ActivityPub::DeliveryWorker
|
|||
light = Stoplight(@inbox_url) do
|
||||
request_pool.with(@host) do |http_client|
|
||||
build_request(http_client).perform do |response|
|
||||
raise Mastodon::UnexpectedResponseError, response unless response_successful?(response) || response_error_unsalvageable?(response)
|
||||
raise Mastodon::UnexpectedResponseError, response unless response_successful?(response) || response_error_unsalvageable?(response) || unsalvageable_authorization_failure?(response)
|
||||
|
||||
@performed = true
|
||||
end
|
||||
|
|
@ -74,6 +74,10 @@ class ActivityPub::DeliveryWorker
|
|||
.run
|
||||
end
|
||||
|
||||
def unsalvageable_authorization_failure?(response)
|
||||
@source_account.suspended_permanently? && response.code == 401
|
||||
end
|
||||
|
||||
def failure_tracker
|
||||
@failure_tracker ||= DeliveryFailureTracker.new(@inbox_url)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue