portage.util.backoff module

class portage.util.backoff.ExponentialBackoff(multiplier=1, base=2, limit=9223372036854775807)

Bases: object

An object that when called with number of previous tries, calculates an exponential delay for the next try.

class portage.util.backoff.RandomExponentialBackoff(multiplier=1, base=2, limit=9223372036854775807)

Bases: portage.util.backoff.ExponentialBackoff

Equivalent to ExponentialBackoff, with an extra multiplier that uses a random distribution between 0 and 1.