runtimepy.net.backoff
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/net/backoff.py

A module implementing a simple exponential-backoff interface.

 
Modules
       
asyncio

 
Classes
       
builtins.object
ExponentialBackoff

 
class ExponentialBackoff(builtins.object)
    ExponentialBackoff(interval: float = 0.1, max_sleep: float = 10.0, max_tries: int = 20) -> None
 
A class implementing a simple exponential-backoff handler.
 
  Methods defined here:
__init__(self, interval: float = 0.1, max_sleep: float = 10.0, max_tries: int = 20) -> None
Initialize this instance.
reset(self) -> None
Reset this instance's state.
async sleep(self) -> None
Sleep for the correct amount of time.

Readonly properties defined here:
give_up
Determine whether or not to give up based on the number of attempts.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__annotations__ = {'attempt': <class 'int'>, 'wait': <class 'float'>}