auto-sync: 2026-05-21 20:10:51
This commit is contained in:
@@ -553,6 +553,22 @@ class Ticker:
|
||||
)
|
||||
spawned.append(agent_id)
|
||||
logger.info("Broadcast spawned %s (session=%s)", agent_id, session_id)
|
||||
# 写广播路由审计记录
|
||||
try:
|
||||
conn = get_connection(db_path)
|
||||
try:
|
||||
conn.execute(
|
||||
"INSERT INTO routing_decisions "
|
||||
"(task_id, mode, selected_agent, reason, outcome, created_at) "
|
||||
"VALUES (?,?,?,?,?,datetime('now'))",
|
||||
(t.id, "broadcast", agent_id,
|
||||
f"Broadcast claim prompt sent", "dispatched"),
|
||||
)
|
||||
conn.commit()
|
||||
finally:
|
||||
conn.close()
|
||||
except Exception:
|
||||
pass # 审计记录失败不影响广播
|
||||
except Exception:
|
||||
self.counter.release(agent_id)
|
||||
logger.exception("Broadcast spawn failed for %s", agent_id)
|
||||
|
||||
Reference in New Issue
Block a user