A Twisted class for retrying failed calls with a customizable back-off schedule.
Project description
txretry provides a Twisted class RetryingCall that will attempt to call a function until it succeeds. A back-off iterator (an interator yielding intervals) can be provided to set the interval between retried calls. When/if the back-off iterator raises StopIteration the attempt to call the function is aborted. An instance of the RetryingCall class provides a start() method that returns a deferred that will fire with the function result or errback with the first failure encountered.
Usage of the class is described in the following blog post: http://blogs.fluidinfo.com/terry/2009/11/12/twisted-code-for-retrying-function-calls/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file txretry-0.0.1.tar.gz
.
File metadata
- Download URL: txretry-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce91259d804f61e1fdcc3dadfc941f8ef2d5c24ad0dd0bddf8dc78560da309a |
|
MD5 | 41bb942a7694317f2cd2d4243efce86d |
|
BLAKE2b-256 | b95cb49d77298084730d249e05d739d35edd0cb6e6a742f8338a4298c3675cc7 |