You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Questions as title, this is source code. Version 9.0.0
classwait_exponential_jitter(wait_base):
"""Wait strategy that applies exponential backoff and jitter. It allows for a customized initial wait, maximum wait and jitter. This implements the strategy described here: https://cloud.google.com/storage/docs/retry-strategy The wait time is min(initial * 2**n + random.uniform(0, jitter), maximum) where n is the retry count. """def__init__(
self,
initial: float=1,
max: float=_utils.MAX_WAIT, # noqaexp_base: float=2,
jitter: float=1,
) ->None:
self.initial=initialself.max=maxself.exp_base=exp_baseself.jitter=jitterdef__call__(self, retry_state: "RetryCallState") ->float:
jitter=random.uniform(0, self.jitter)
try:
exp=self.exp_base** (retry_state.attempt_number-1)
result=self.initial*exp+jitterexceptOverflowError:
result=self.maxreturnmax(0, min(result, self.max))
The text was updated successfully, but these errors were encountered:
Questions as title, this is source code. Version 9.0.0
The text was updated successfully, but these errors were encountered: