🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-06-14 17:28:38 +00:00
parent d0c07da977
commit 86be17405a
4 changed files with 19 additions and 22 deletions

5
bot.py
View File

@@ -122,10 +122,7 @@ async def graceful_shutdown():
# 等待所有任务完成,设置超时
try:
await asyncio.wait_for(
asyncio.gather(*remaining_tasks, return_exceptions=True),
timeout=15.0
)
await asyncio.wait_for(asyncio.gather(*remaining_tasks, return_exceptions=True), timeout=15.0)
logger.info("所有剩余任务已成功取消")
except asyncio.TimeoutError:
logger.warning("等待任务取消超时,强制继续关闭")