Comment additions for exponential backoff
Change-Id: If43d6e5ceedc17b1763ecd8a244f959150b802e1
This commit is contained in:
@@ -113,6 +113,10 @@ class AttrDict(dict):
|
||||
|
||||
|
||||
class ExponentialBackoff(object):
|
||||
"""An iterable object that will yield back an exponential delay sequence
|
||||
provided an exponent and a number of items to yield. This object may be
|
||||
iterated over multiple times (yielding the same sequence each time).
|
||||
"""
|
||||
def __init__(self, attempts, exponent=2):
|
||||
self.attempts = int(attempts)
|
||||
self.exponent = exponent
|
||||
|
||||
Reference in New Issue
Block a user