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

Unified Diff: scm.py

Issue 3326004: gclient: exponential backoff of SCM commands on known failure types.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 4 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 | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
===================================================================
--- scm.py (revision 58351)
+++ scm.py (working copy)
@@ -364,6 +364,7 @@
}[args[0]]
compiled_pattern = re.compile(pattern)
# Place an upper limit.
+ backoff_time = 5
for _ in range(10):
previous_list_len = len(file_list)
failure = []
@@ -417,8 +418,9 @@
if len(file_list) == previous_list_len and not IsKnownFailure():
# No known svn error was found and no progress, bail out.
raise
- print "Sleeping 15 seconds and retrying...."
- time.sleep(15)
+ print "Sleeping %.1f seconds and retrying...." % backoff_time
+ time.sleep(backoff_time)
+ backoff_time *= 1.3
continue
break
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698