Changed backoff to be exponential. This will help to reduce apply_issue flakiness.

BUG=373797
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/323363002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277040 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
sergiyb@chromium.org 11 years ago
parent 2a13d4f41d
commit 538f602e19

@ -409,7 +409,7 @@ class Rietveld(object):
old_error_exit(msg)
upload.ErrorExit = trap_http_500
maxtries = 5
maxtries = 40
for retry in xrange(maxtries):
try:
logging.debug('%s' % request_path)
@ -435,7 +435,7 @@ class Rietveld(object):
if not 'timed out' in str(e):
raise
# If reaching this line, loop again. Uses a small backoff.
time.sleep(1+maxtries*2)
time.sleep(min(10, 1+retry*2))
finally:
upload.ErrorExit = old_error_exit

Loading…
Cancel
Save