Closed jaoxford closed 4 years ago
This pattern is used in the testcases.
As we can see from the assert statements the counter is incremented to 3 before the block in the except statement is called.
If you want to log the exceptions that occur in foo
they should be logged from the inside.
@retry(
retry_on_exceptions=(FooException),
max_calls_total=3,
retry_window_after_first_call_in_seconds=60,
)
def wrap_foo:
try:
foo()
except Exception as e:
log(e)
raise e
def foo:
pass
Lovely, thank you!
Hi there,
I'm curious to know if this library will work when a function is called from within a try block? If an exception happens inside the function being called will the except block be called, or only if the retries happen to fail?