-
-
Notifications
You must be signed in to change notification settings - Fork 304
Description
My lib uses aiohttp. I want a retry mechanism when we are logout from the server. So here what I write:
async def relogin(retry_state):
await retry_state.args[0].login()
print(retry_state)
@retry(
retry=retry_if_exception_type(NotAuthenticatedException),
stop=stop_after_attempt(1),
retry_error_callback=relogin
)
async def execute_scenario(self, oid: str) -> str:
response = await self.__post(f"exec/{oid}")
return response["execId"]Sadly, I got
sys:1: RuntimeWarning: coroutine 'relogin' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
What I want to achieve is not possible?
iMicknl, michaeloliverx, Oscar-Campo, nicholasamorim, symphony-youness and 2 more
Metadata
Metadata
Assignees
Labels
No labels