[Twisted-Python] Retrying function calls
terry at jon.es
Sun Nov 1 14:09:15 EST 2009
Following up on my own post:
> When the backoff iterator finishes, the RetryingCall class gives up on
> trying to get a non-error result from the function. In that case you just
> get a StopIteration exception in the failure that start() deferred
> returns (I was originally returning the original failure, but decided to
> simplify. If you want that, you can keep it yourself in an error tracking
> class, see below).
Thinking about it a bit more it seems more sensible that the start method's
default failureTester function ignores all failures, and that in the case
of an eventual failure, you get the first ever (or last ever) failure back.
Those changes would make the RetryingCall class more useful (as it stands
with the defaults you get a failure back the first time something goes
wrong, so in the default case the class doesn't even do what it says).
I wont post the changes here, as I don't even know if anyone else is
interested. Contact me if you want an updated version.
More information about the Twisted-Python