retry_decorator/retry_decorator.py
def retry(exc=Exception, tries=10, timeout_secs=1.0, logger=None, callback_by_exception=None):
    """
    Retry calling the decorated function using an exponential backoff.

    :param exc: catch all exceptions, a specific exception, or an iterable of exceptions
    :param tries: how many attempts to retry when catching those exceptions
    :param timeout_secs: general delay between retries (we do employ a jitter)
    :param logger: an optional logger object
    :param callback_by_exception: callback/method invocation on certain exceptions
    :type callback_by_exception: None or dict
    """
    # We re-use `RetryHandler` so that we can reduce duplication; decorator is still useful!
    retry_handler = RetryHandler(exc, tries, timeout_secs, logger, callback_by_exception)
    return retry_handler

    Retry calling the decorated function using an exponential backoff.

    :param exc: catch all exceptions, a specific exception, or an iterable of exceptions
    :param tries: how many attempts to retry when catching those exceptions
    :param timeout_secs: general delay between retries (we do employ a jitter)
    :param logger: an optional logger object
    :param callback_by_exception: callback/method invocation on certain exceptions
    :type callback_by_exception: None or dict
    
Retry calling the decorated function using an exponential backoff.
Retry calling the decorated function using an exponential backoff .
def retry(exc=Exception, tries=10, timeout_secs=1.0, logger=None, callback_by_exception=None):
    retry_handler = RetryHandler(exc, tries, timeout_secs, logger, callback_by_exception)
    return retry_handler
def retry ( exc = Exception , tries = 10 , timeout_secs = 1.0 , logger = None , callback_by_exception = None ) : retry_handler = RetryHandler ( exc , tries , timeout_secs , logger , callback_by_exception ) return retry_handler
Retry calling the decorated function using an exponential backoff.
Retry calling the decorated function using an exponential backoff .
"""
    Retry calling the decorated function using an exponential backoff.

    :param exc: catch all exceptions, a specific exception, or an iterable of exceptions
    :param tries: how many attempts to retry when catching those exceptions
    :param timeout_secs: general delay between retries (we do employ a jitter)
    :param logger: an optional logger object
    :param callback_by_exception: callback/method invocation on certain exceptions
    :type callback_by_exception: None or dict
    """ # We re-use `RetryHandler` so that we can reduce duplication; decorator is still useful!
exc
catch all exceptions, a specific exception, or an iterable of exceptions
catch all exceptions a specific exception or an iterable of exceptions
tries
None
timeout_secs
general delay between retries (we do employ a jitter)
general delay between retries ( we do employ a jitter )
logger
an optional logger object
an optional logger object
callback_by_exception
callback/method invocation on certain exceptions
callback / method invocation on certain exceptions