-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: add timeout to asyncio.wait during CLI execution to avoid hanging when callback is enabled #1770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add timeout to asyncio.wait during CLI execution to avoid hanging when callback is enabled #1770
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
_, pending = await asyncio.wait(tasks, timeout=30) | ||
if pending: | ||
get_logger().warning( | ||
f"{len(pending)} callback tasks({[task.get_coro() for task in pending]}) did not complete within timeout" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrT23 Thanks! I added coroutine details to help identify which task is pending. Let me know if anything looks off.
User description
When integrating with logging observability platforms:
PR Type
Bug fix, Enhancement
Description
asyncio.wait
when callbacks are enabledChanges walkthrough 📝
cli.py
Add timeout and empty-task check to event queue wait
pr_agent/cli.py
asyncio.wait
for callback tasks