Skip to content

Conversation

@SoulTch
Copy link
Contributor

@SoulTch SoulTch commented Dec 12, 2024

Retry blocks the event loop when it retries for exceptions. Fix this by using asyncio.sleep.

async def _asyncio_sleep(secs: float) -> None:
await asyncio.sleep(secs)

@asynq(asyncio_fn=_asyncio_sleep)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@asynq(asyncio_fn=_asyncio_sleep)
@asynq(asyncio_fn=asyncio.sleep)

I don't think you need the wrapper function?

@JelleZijlstra
Copy link
Contributor

You also need to run black on tools.py to fix CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants