| Index: third_party/gsutil/third_party/apitools/apitools/base/py/util.py
|
| diff --git a/third_party/gsutil/third_party/apitools/apitools/base/py/util.py b/third_party/gsutil/third_party/apitools/apitools/base/py/util.py
|
| old mode 100755
|
| new mode 100644
|
| index 779dd97f13dce1d5f076118b66accb3e3666974c..b92c9f8a43898dd6081607ee52aba1581933b048
|
| --- a/third_party/gsutil/third_party/apitools/apitools/base/py/util.py
|
| +++ b/third_party/gsutil/third_party/apitools/apitools/base/py/util.py
|
| @@ -126,20 +126,17 @@ def CalculateWaitForRetry(retry_attempt, max_wait=60):
|
|
|
| Args:
|
| retry_attempt: Retry attempt counter.
|
| - max_wait: Upper bound for wait time.
|
| + max_wait: Upper bound for wait time [seconds].
|
|
|
| Returns:
|
| - Amount of time to wait before retrying request.
|
| + Number of seconds to wait before retrying request.
|
|
|
| """
|
|
|
| wait_time = 2 ** retry_attempt
|
| - # randrange requires a nonzero interval, so we want to drop it if
|
| - # the range is too small for jitter.
|
| - if retry_attempt:
|
| - max_jitter = (2 ** retry_attempt) / 2
|
| - wait_time += random.randrange(-max_jitter, max_jitter)
|
| - return min(wait_time, max_wait)
|
| + max_jitter = wait_time / 4.0
|
| + wait_time += random.uniform(-max_jitter, max_jitter)
|
| + return max(1, min(wait_time, max_wait))
|
|
|
|
|
| def AcceptableMimeType(accept_patterns, mime_type):
|
|
|