Open sametmax opened 7 years ago
Async function support has been added to https://github.com/leshchenko1979/reretry
@leshchenko1979 it looks like this repo no longer exists. Is there a place to find it?
I forked this and made it work for async: https://github.com/jerber/retry-async.
Example:
from retry_async import retry
@retry(is_async=True)
async def example_async() -> bool:
return True
@retry(is_async=False)
def example_sync() -> bool:
return True
@jerber I've corrected the repo link above, sorry for the confusion.
For those (like me) that got into this issue as well, there's also the library backoff that serves similar purpose and supports async functions.
Right now if you want to use retry with asyncio, you need to write all calls into a run_until_complete.