From de9caadff806fe2d45a89706ee754699af285b27 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 17 May 2026 21:43:26 +0800 Subject: [PATCH] auto-sync: 2026-05-17 21:43:26 --- src/daemon/dispatcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/daemon/dispatcher.py b/src/daemon/dispatcher.py index fcdfed8..8606850 100644 --- a/src/daemon/dispatcher.py +++ b/src/daemon/dispatcher.py @@ -122,6 +122,8 @@ class Dispatcher: decision = self.decide(task, action_type) level = decision["level"] + # 从 project_config 获取项目级 DB 路径(路由审计日志写入项目 DB) + _routing_db = Path(project_config["db_path"]) if project_config and "db_path" in project_config else None agent_id = decision["agent_id"] # 检查并发限制 @@ -245,7 +247,7 @@ class Dispatcher: if not effective_db: return try: - conn = sqlite3.connect(str(self.db_path)) + conn = sqlite3.connect(str(effective_db)) conn.row_factory = sqlite3.Row try: conn.execute("BEGIN IMMEDIATE")