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

Unified Diff: gclient_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 | « no previous file | scm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
===================================================================
--- gclient_scm.py (revision 58351)
+++ gclient_scm.py (working copy)
@@ -256,6 +256,7 @@
raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch)
# Update the remotes first so we have all the refs.
+ backoff_time = 5
for _ in range(10):
try:
remote_output, remote_err = scm.GIT.Capture(
@@ -268,8 +269,10 @@
# 502 in stderr should be fine.
if '502' in e.stderr:
options.stdout.write(str(e) + '\n')
- options.stdout.write('Sleeping 15 seconds and retrying...\n')
- time.sleep(15)
+ options.stdout.write('Sleeping %.1f seconds and retrying...\n' %
+ backoff_time)
+ time.sleep(backoff_time)
+ backoff_time *= 1.3
continue
raise
« no previous file with comments | « no previous file | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698