mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
Log a warning when there are pending asyncio tasks
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
parent
e7317ce99f
commit
d86d1ef3dc
1 changed files with 3 additions and 1 deletions
|
|
@ -88,7 +88,9 @@ def run(inargs=None, args=None):
|
|||
get_logger().debug("Waiting for event queue to complete")
|
||||
tasks = [task for task in asyncio.all_tasks() if task is not asyncio.current_task()]
|
||||
if tasks:
|
||||
await asyncio.wait(tasks, timeout=30)
|
||||
done, pending = await asyncio.wait(tasks, timeout=30)
|
||||
if pending:
|
||||
get_logger().warning(f"{len(pending)} callback tasks did not complete within timeout")
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue