indicate when retrying pixiv connections
This commit is contained in:
@@ -155,6 +155,7 @@ class PixivApiClient
|
|||||||
raise Error.new("Pixiv API call failed (status=#{resp.code} body=#{body})")
|
raise Error.new("Pixiv API call failed (status=#{resp.code} body=#{body})")
|
||||||
end
|
end
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
|
print "R"
|
||||||
sleep(5)
|
sleep(5)
|
||||||
retry
|
retry
|
||||||
rescue JSON::ParserError
|
rescue JSON::ParserError
|
||||||
@@ -190,6 +191,7 @@ class PixivApiClient
|
|||||||
end
|
end
|
||||||
|
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
|
print "R"
|
||||||
sleep(5)
|
sleep(5)
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user