Commit 538f602e authored by sergiyb@chromium.org's avatar sergiyb@chromium.org

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
parent 2a13d4f4
...@@ -409,7 +409,7 @@ class Rietveld(object): ...@@ -409,7 +409,7 @@ class Rietveld(object):
old_error_exit(msg) old_error_exit(msg)
upload.ErrorExit = trap_http_500 upload.ErrorExit = trap_http_500
maxtries = 5 maxtries = 40
for retry in xrange(maxtries): for retry in xrange(maxtries):
try: try:
logging.debug('%s' % request_path) logging.debug('%s' % request_path)
...@@ -435,7 +435,7 @@ class Rietveld(object): ...@@ -435,7 +435,7 @@ class Rietveld(object):
if not 'timed out' in str(e): if not 'timed out' in str(e):
raise raise
# If reaching this line, loop again. Uses a small backoff. # If reaching this line, loop again. Uses a small backoff.
time.sleep(1+maxtries*2) time.sleep(min(10, 1+retry*2))
finally: finally:
upload.ErrorExit = old_error_exit upload.ErrorExit = old_error_exit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment