Package flumotion :: Package twisted :: Module defer :: Class RetryingDeferred
[hide private]

Class RetryingDeferred

source code

object --+

Provides a mechanism to attempt to run some deferred operation until it succeeds. On failure, the operation is tried again later, exponentially backing off.

Instance Methods [hide private]
__init__(self, deferredCreate, *args, **kwargs)
Create a new RetryingDeferred.
source code
Start trying.
source code
cancel(self) source code
_retry(self) source code
_success(self, val) source code
_failed(self, failure) source code
_nextDelay(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  maxDelay = 1800
  initialDelay = 5.0
  factor = 2.71828182846
  jitter = 0.11962656492
  delay = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, deferredCreate, *args, **kwargs)

source code 

Create a new RetryingDeferred. Will call deferredCreate(*args, **kwargs) each time a new deferred is needed.

Overrides: object.__init__


source code 

Start trying. Returns a deferred that will fire when this operation eventually succeeds. That deferred will only errback if this RetryingDeferred is cancelled (it will then errback with the result of the next attempt if one is in progress, or a CancelledError. # TODO: yeah?