Skip to content

Commit cbaedce

Browse files
committed
graphviz: retry on server error
1 parent 8e07071 commit cbaedce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docs/core/requester.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def build_and_queue_request(url, options = {}, &block)
5454
end
5555

5656
def handle_response(response)
57-
if response.code.to_i == 0 || (response.code.to_i >= 500 && response.code.to_i < 600)
57+
if ENV['RETRY'] == '1' && [0, 500, 501, 502, 503, 504].include?(response.code.to_i)
5858
instrument 'handle_response.retry', url: response.url do
5959
build_and_queue_request(response.url)
6060
end

0 commit comments

Comments
 (0)