fix(tasks): REST对账剔除idle多智能体任务——对齐socket语义,修复幽灵运行态与回收器误阻塞
This commit is contained in:
parent
6b5b173260
commit
e8bbaccfd0
@ -656,6 +656,13 @@ class TaskManager:
|
||||
if status in terminal_statuses:
|
||||
continue
|
||||
if task_info.get('multi_agent_mode'):
|
||||
# idle = 本轮输出结束、保留上下文等待指令,不算运行中。
|
||||
# 对齐 socket task_complete 语义(chat_flow_task_main.py:
|
||||
# 仅 running 实例 + pending master 消息算活跃),否则
|
||||
# REST 对账会把已空闲的多智能体对话误判为运行中(前端
|
||||
# 幽灵轮询),且回收器永远不敢回收该对话的 terminal。
|
||||
if status == "idle":
|
||||
continue
|
||||
result["has_running_multi_agent"] = True
|
||||
else:
|
||||
result["has_running_sub_agents"] = True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user