tenacity
tenacity copied to clipboard
Retrying library for Python
I add retry decorator on my database `execute` method, but when the database lost connection during the query, retry is not triggered. Here is my DB class: ```python class DB(object):...
Hey I have configure my function like so: ```python @retry(wait=wait_exponential(multiplier=1, max=6), stop=retry_if_result(lambda state: isinstance(state, ValueError)), retry_error_callback=log_exception, after=after_log(logger, logging.WARNING)) ``` However, when the waiting time is exceeded the function is still...
currently before_sleep function can't accept arguments for the function given. it would be nice to be able to do that, without the use of a class property do bypass it.
Assuming the situation that tenacity wraps methods calling a remote web service ```(python) import logging import sys from tenacity import Retrying, before_sleep_log, stop_after_attempt, wait_exponential from service import CLIENT logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)...
We should not retry CanceledError exceptions because it can lead to a severe bug when canceled coroutine will continue running in the background because retry stops it to cancel. "suppressing...
The strings appear not to be getting rendered properly - it's a typo on line 27 of before.py I think.
First of all, awesome package, first day using it and it's already useful Second, it's my first day using it, apologies if I'm not using it as intended, but: It...
I am trying to handle exception by myself and I want the program to perform extra action when retry count reaches the max retry count. Currently I have to override...
The current implementation of `wait_base.__add__` and `wait_base.__radd__` do almost no type checking. Thus it is possible to create nonsensical wait conditions. For instance, I accidentally wrote this code which is...
but is shown in line 86 of doc/source/index.rst ` from tenacity import *` https://www.python.org/dev/peps/pep-0008/#imports > Wildcard imports (from import *) should be avoided, as they make it unclear which names...