def backoffPolicy(initialDelay=1.0, maxDelay=60.0, factor=1.5, jitter=_goodEnoughRandom):
 def policy(attempt):
  return (min((initialDelay * (factor ** attempt)), maxDelay) + jitter())
 return policy

def backoffPolicy ( initialDelay = 1.0 , maxDelay = 60.0 , factor = 1.5 , jitter = _goodEnoughRandom ) : def policy ( attempt ) : return ( min ( ( initialDelay * ( factor ** attempt ) ) , maxDelay ) + jitter ( ) ) return policy
a timeout policy for l{clientservice} which computes an exponential backoff interval with configurable parameters .