0
0
Fork 0

Update stoplight to version 4.1.0 (#28366)

This commit is contained in:
Matt Jankowski 2024-04-02 11:47:40 -04:00 committed by GitHub
parent 921c4c1273
commit edde54e991
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 30 additions and 33 deletions

View file

@ -84,13 +84,11 @@ module Paperclip
# Don't go through Stoplight if we don't have anything object-storage-oriented to do
return super if @queued_for_delete.empty? && @queued_for_write.empty? && !dirty?
Stoplight('object-storage') { super }.with_threshold(STOPLIGHT_THRESHOLD).with_cool_off_time(STOPLIGHT_COOLDOWN).with_error_handler do |error, handle|
if error.is_a?(Seahorse::Client::NetworkingError)
handle.call(error)
else
raise error
end
end.run
Stoplight('object-storage')
.with_threshold(STOPLIGHT_THRESHOLD)
.with_cool_off_time(STOPLIGHT_COOLDOWN)
.with_error_handler { |error, handle| error.is_a?(Seahorse::Client::NetworkingError) ? handle.call(error) : raise(error) }
.run { super }
end
end
end