(attempt)
return min(delay, MAX_DELAY)
From the go client
    https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29
From the go client
    https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29
From the go client https : // github . com / taskcluster / go - got / blob / 031f55c / backoff . go#L24 - L29
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)
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 )