Chromium Code Reviews| Index: scripts/slave/bot_update.py |
| diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py |
| index 65a8178e0a959c14e5c0502a0e16dbef3f13d726..ec06e9b6ede8ef02e2d49a77e5e5827524f64678 100755 |
| --- a/scripts/slave/bot_update.py |
| +++ b/scripts/slave/bot_update.py |
| @@ -14,6 +14,7 @@ import json |
| import optparse |
| import os |
| import pprint |
| +import random |
| import re |
| import socket |
| import subprocess |
| @@ -415,6 +416,11 @@ def call(*args, **kwargs): # pragma: no cover |
| return outval |
| if result is FAIL: |
| break |
| + if result is RETRY: |
| + sleep_backoff = 4 ** attempt |
| + sleep_time = random.randint(sleep_backoff, int(sleep_backoff * 1.2)) |
| + print '===backing off, sleeping for %ds===' % sleep_time |
|
agable
2015/07/24 02:48:17
I'm scared that "%ds" is a format thing. Maybe do
ghost stip (do not use)
2015/07/24 02:50:16
done
|
| + time.sleep(sleep_time) |
| raise SubprocessFailed('%s failed with code %d in %s after %d attempts.' % |
| (' '.join(args), code, cwd, attempt), |