Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Unified Diff: rietveld.py

Issue 323363002: Changed backoff to be exponential. This will help to reduce apply_issue flakiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rietveld.py
diff --git a/rietveld.py b/rietveld.py
index d78c0171d468f789ca5be44b3aea1434cd4dbed8..f6ccaf928f1041dca6c00100f477a4e141ed796a 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698