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

Unified Diff: scripts/slave/bot_update.py

Issue 1254753002: Add exponential backoff to bot_update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 5 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: scripts/slave/bot_update.py
diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py
index 65a8178e0a959c14e5c0502a0e16dbef3f13d726..52617a388031cc45adfc7d21804e7e567681e5dd 100755
--- a/scripts/slave/bot_update.py
+++ b/scripts/slave/bot_update.py
@@ -415,6 +415,10 @@ def call(*args, **kwargs): # pragma: no cover
return outval
if result is FAIL:
break
+ if attempt > 0:
agable 2015/07/24 02:37:22 attempt is always > 0, it starts at 1. I think you
+ sleep_time = 4 ** attempt
agable 2015/07/24 02:37:22 jitter by +/- 20%?
+ print '===backing off, sleeping for %ds===' % sleep_time
+ time.sleep(sleep_time)
raise SubprocessFailed('%s failed with code %d in %s after %d attempts.' %
(' '.join(args), code, cwd, attempt),
« 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