summaryrefslogtreecommitdiff
path: root/retrying.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #37 from harlowja/allow-retry-on-exception-exception-tupleRay Holder2016-06-061-1/+12
|\ | | | | Allow providing exception tuple for 'retry_on_exception' argument
| * Allow providing exception tuple for 'retry_on_exception' argumentJoshua Harlow2015-06-231-1/+12
| | | | | | | | | | | | | | It seems like a common pattern to have a function that is used that just checks if the exception that is thrown is of a given type so to avoid duplicating this pattern by all retry library users just natively provide support for it.
* | Merge pull request #40 from cyrusd/masterRay Holder2016-06-051-1/+11
|\ \ | | | | | | Callbacks for before/after attempts
| * | Adds two additional parameters to the Retrying() constructor:cyrus durgin2015-09-101-1/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | _before_attempts _after_attempts Each of these should be a reference to a function that takes a single argument, attempt_number. _before_attempts will be called before each attempt is run; _after_attempts is run after any *unsuccessful* attempt. Handy for logging status messages, etc in between attempts.
* | Merge pull request #38 from harlowja/incrementing-wait-maxRay Holder2016-06-051-0/+4
|\ \ | | | | | | Add a upper bound on incrementing wait
| * | Add a upper bound on incrementing waitJoshua Harlow2015-06-231-0/+4
| |/
* | Declare a few methods staticJulien Danjou2015-06-011-3/+6
|/ | | | A few methods are actually static, declare them as such.
* remove six license boilerplate since we're not embedding it anymoreRay Holder2014-11-091-23/+0
|
* Merge pull request #23 from harlowja/jitterRay Holder2014-11-091-1/+6
|\ | | | | Allow a jitter value to be passed in
| * Allow a jitter value to be passed inJoshua Harlow2014-10-291-1/+6
| | | | | | | | | | | | | | | | | | | | To avoid the thundering herd problem when retrying is triggered at exactly the same moment by many entities allow for passing in a jitter maximum value which will be used to randomly alter the amount of time slept by each retrying object user; this helps randomize the thundering herd and makes it possible to reduce the issue.
* | Ensure we wrap the decorated functionsJoshua Harlow2014-10-031-0/+4
|/ | | | | | | To avoid losing the original functions docs, name and other attributes ensure that this correctly uses six.wraps (which uses functools.wraps internally) to wrap the decorated function.
* Replaced bundled code with using sixHaïkel Guémar2014-09-051-26/+2
|
* Support custom wait and stop functions.Daniel Nephin2014-08-221-3/+11
|
* add comments from rdooley, add comment around stop behaviorRay Holder2014-06-201-1/+7
|
* If possible, raise the last exception when stoppingSimon Dollé2014-06-151-1/+4
| | | | | | | When we stop retrying because of recurring exceptions, we expect the decorator to raise the last exception. (if wrap_exception==False) This commit fixes issue #8.
* Fix AttributeError when explicitly specifying wait type, and add appropriate ↵Alex Kuang2014-05-051-1/+1
| | | | regression tests. (fixes #4)
* remove need for specification of stop/wait typeDerek Wilson2014-05-021-35/+62
| | | | because it can be inferred from the args passed in
* add even moar Python 3.x compatibility hacks from the six project, update ↵Ray Holder2014-03-311-2/+51
| | | | license
* propagate complete tracebacks such that they show up in nested stack frames, ↵Ray Holder2014-03-301-5/+12
| | | | adjust api and tests #1
* fixed a bug where classes not extending from the Python exception hierarchy ↵Ray Holder2013-03-201-1/+3
| | | | could slip through, preparing for 1.0.1 release
* Python 3.2 compatibility fix, since we don't have sys.maxint anymore...Ray Holder2013-01-221-2/+4
|
* add configurable support for wrapping any raised Exception in a RetryError ↵Ray Holder2013-01-221-14/+42
| | | | instead of just raising it directly, add a few more comments
* default to retry on any exception, handle @retry and @retry() behaviorRay Holder2013-01-211-26/+27
|
* clean up some TODO's and commentsRay Holder2013-01-191-16/+7
|
* adding first stable implementation, reasonable passing test coverageRay Holder2013-01-191-0/+181