You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to see what's happening in the logs when a retry is necessary. The cleanup function is nice but I'd like to access the exception object in order to print it in my warning message. I understand that I can puttry...except inside on my foo function but I like the conciseness of letting redo deal with the inner exceptions.
bar=retry(
action=foo,
attempts=5,
sleeptime=5,
retry_exceptions=(MyCustomError,),
cleanup=lambda: log.warn('Trying the operation again. But why did it fail?'))
The text was updated successfully, but these errors were encountered:
I'd like to see what's happening in the logs when a
retry
is necessary. Thecleanup
function is nice but I'd like to access the exception object in order to print it in my warning message. I understand that I can puttry...except
inside on myfoo
function but I like the conciseness of letting redo deal with the inner exceptions.The text was updated successfully, but these errors were encountered: