Open
Description
I think it would be great to add a sleep
argument which defaults to asyncio.sleep
to improve support for event loops besides asyncio
, while keeping it working out of the box for asyncio
. I like backoff and would like to stick with it, but it ended up being too much of a hassle to get it working with trio.
tenacity
has this feature, with the following syntax/explanation.
You can even use alternative event loops such as curio or Trio by passing the correct sleep function:
@retry(sleep=trio.sleep)
async def my_async_function(loop):
await asks.get('https://example.org')
Metadata
Metadata
Assignees
Labels
No labels