fix(chat): OpenClaw timeout 30→40s,NemoClaw 50→60s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 6m51s

get_system_context() k8s/DB 查詢加上 _call_openclaw 30s,
總計超過外層 shield 30s 導致 OpenClaw 全部超時。
放寬 timeout 讓兩個 AI 有足夠時間回應。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-03 16:27:08 +08:00
parent 4284337249
commit be247d6c5c

View File

@@ -166,16 +166,16 @@ class ChatManager:
)
)
# OpenClaw 最多等 30sNemoClaw 最多等 50s
# OpenClaw 最多等 40s(含 context 取得時間)NemoClaw 最多等 60s
try:
openclaw_raw = await asyncio.wait_for(asyncio.shield(openclaw_task), timeout=30.0)
openclaw_raw = await asyncio.wait_for(asyncio.shield(openclaw_task), timeout=40.0)
except asyncio.TimeoutError:
openclaw_raw = None
openclaw_block = f"🦞 <b>OpenClaw:</b>\n{openclaw_raw or '🔴 無響應'}"
try:
nemo_raw = await asyncio.wait_for(nemo_task, timeout=50.0)
nemo_raw = await asyncio.wait_for(nemo_task, timeout=60.0)
except asyncio.TimeoutError:
nemo_raw = None