-
-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Description
I have the following code:
@Retry(retry=retry_if_exception_type(SomeException),
stop=stop_after_attempt(5),
before_sleep=before_sleep_log(logging.getLogger(), logging.ERROR),
wait=wait_exponential(multiplier=1, min=1, max=10),
before=before_retry_handler)
async def async_wrapper(param):
....
async def before_retry_handler(retry_state):
....
Trouble is before_retry_handler has to be async because it calls async functions.
When I try to use the above, I get "RuntimeWarning: coroutine 'before_retry_handler' was never awaited self.before(retry_state)".
Am I missing something?
Thanks in advance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels