Update stoplight to version 4.1.0 (#28366)
This commit is contained in:
parent
921c4c1273
commit
edde54e991
8 changed files with 30 additions and 33 deletions
|
@ -59,7 +59,7 @@ class ActivityPub::DeliveryWorker
|
|||
end
|
||||
|
||||
def perform_request
|
||||
light = Stoplight(@inbox_url) do
|
||||
stoplight_wrapper.run 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)
|
||||
|
@ -68,10 +68,12 @@ class ActivityPub::DeliveryWorker
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
light.with_threshold(STOPLIGHT_FAILURE_THRESHOLD)
|
||||
.with_cool_off_time(STOPLIGHT_COOLDOWN)
|
||||
.run
|
||||
def stoplight_wrapper
|
||||
Stoplight(@inbox_url)
|
||||
.with_threshold(STOPLIGHT_FAILURE_THRESHOLD)
|
||||
.with_cool_off_time(STOPLIGHT_COOLDOWN)
|
||||
end
|
||||
|
||||
def failure_tracker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue