add wait on delay (#794)
This commit is contained in:
@@ -311,6 +311,10 @@ class Transport(object):
|
|||||||
connection = self.get_connection()
|
connection = self.get_connection()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# add a delay before attempting the next retry
|
||||||
|
# 0, 1, 3, 7, etc...
|
||||||
|
delay = 2**attempt - 1
|
||||||
|
time.sleep(delay)
|
||||||
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
|
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
|
||||||
|
|
||||||
except TransportError as e:
|
except TransportError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user