OpenQuizz
Une application de gestion des contenus pédagogiques
wait_exponential Class Reference
Inheritance diagram for wait_exponential:
Collaboration diagram for wait_exponential:

Public Member Functions

def __init__ (self, multiplier=1, max=_utils.MAX_WAIT, exp_base=2, min=0)
 
def __call__ (self, retry_state)
 
- Public Member Functions inherited from wait_base
def __add__ (self, other)
 
def __radd__ (self, other)
 

Data Fields

 multiplier
 
 min
 
 max
 
 exp_base
 

Detailed Description

Wait strategy that applies exponential backoff.

It allows for a customized multiplier and an ability to restrict the
upper and lower limits to some maximum and minimum value.

The intervals are fixed (i.e. there is no jitter), so this strategy is
suitable for balancing retries against latency when a required resource is
unavailable for an unknown duration, but *not* suitable for resolving
contention between multiple processes for a shared resource. Use
wait_random_exponential for the latter case.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  multiplier = 1,
  max = _utils.MAX_WAIT,
  exp_base = 2,
  min = 0 
)

Member Function Documentation

◆ __call__()

def __call__ (   self,
  retry_state 
)

Reimplemented from wait_base.

Reimplemented in wait_random_exponential.

Field Documentation

◆ exp_base

exp_base

◆ max

max

◆ min

min

◆ multiplier

multiplier

The documentation for this class was generated from the following file: