parameters: (attempt)
return_statement: return min(delay, MAX_DELAY)
docstring: From the go client
      https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29
docstring_summary: From the go client
      https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29
docstring_tokens: From the go client https : // github . com / taskcluster / go - got / blob / 031f55c / backoff . go#L24 - L29
function: def calculateSleepTime(attempt):
      """ From the go client
      https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29
      """
      if attempt <= 0:
          return 0
  
      # We subtract one to get exponents: 1, 2, 3, 4, 5, ..
      delay = float(2 ** (attempt - 1)) * float(DELAY_FACTOR)
      # Apply randomization factor
      delay = delay * (RANDOMIZATION_FACTOR * (random.random() * 2 - 1) + 1)
      # Always limit with a maximum delay
      return min(delay, MAX_DELAY)
function_tokens: def calculateSleepTime ( attempt ) : if attempt <= 0 : return 0 # We subtract one to get exponents: 1, 2, 3, 4, 5, .. delay = float ( 2 ** ( attempt - 1 ) ) * float ( DELAY_FACTOR ) # Apply randomization factor delay = delay * ( RANDOMIZATION_FACTOR * ( random . random ( ) * 2 - 1 ) + 1 ) # Always limit with a maximum delay return min ( delay , MAX_DELAY )