txretry provides a Twisted class, RetryingCall, that calls a function until it succeeds. A back-off iterator (a generator function that yields intervals) can be specified to customize 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/
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-1.0.1.tar.gz.
File metadata
- Download URL: txretry-1.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16c2aa9e9c676906d43f0a4f3e9b1517a76acd0eeb0cadbce03c5e366029b391
|
|
| MD5 |
20683ad55fecad717f3cab1e294c11a3
|
|
| BLAKE2b-256 |
cda2a7153625b71d6b3dc213dac220eec602e03c13ec2bc1af424d6076e7c566
|