-
-
Notifications
You must be signed in to change notification settings - Fork 307
Closed as not planned
Description
Could we support retry for Asynchronous Generator?
import asyncio
import random
from tenacity import retry
@retry
async def ticker(delay, to):
"""Yield numbers from 0 to `to` every `delay` seconds."""
for i in range(to):
if random.randint(0, 10) > 1:
raise IOError("Broken sauce, everything is hosed!!!111one")
else:
yield i
await asyncio.sleep(delay)
async for i in ticker(1, 10):
print(i)See: PEP 525
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels