# Retry Helpers¶

class redis.retry.Retry(backoff, retries, supported_errors=(<class 'redis.exceptions.ConnectionError'>, <class 'redis.exceptions.TimeoutError'>, <class 'socket.timeout'>))[source]

Retry a specific number of times after a failure

call_with_retry(do, fail)[source]

Execute an operation that might fail and returns its result, or raise the exception that was thrown depending on the Backoff object. do: the operation to call. Expects no argument. fail: the failure handler, expects the last error that was thrown

update_supported_erros(specified_errors: list)[source]

Updates the supported errors with the specified error types