test: drain web agent owners before loop close

This commit is contained in:
jxxghp
2026-08-24 09:57:02 +08:00
parent 2274a354dc
commit af97f2c27a
4 changed files with 37 additions and 8 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ async def shutdown_web_agent_background_tasks() -> None:
async def wait_web_agent_background_tasks() -> None:
"""等待已登记的 Web Agent 任务完成取消后的最终收尾。"""
"""等待已登记的 Web Agent 任务完成最终收尾。"""
tasks = tuple(_WEB_AGENT_BACKGROUND_TASKS)
if tasks:
await asyncio.gather(*tasks, return_exceptions=True)