From cda9653d4e326a9aadcabefa4012db48e89682bc Mon Sep 17 00:00:00 2001 From: cfdaily Date: Mon, 18 May 2026 23:23:41 +0800 Subject: [PATCH] auto-sync: 2026-05-18 23:23:41 --- src/blackboard/operations.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blackboard/operations.py b/src/blackboard/operations.py index 0e2611a..348bd22 100644 --- a/src/blackboard/operations.py +++ b/src/blackboard/operations.py @@ -66,7 +66,8 @@ class Blackboard: task.retry_count, task.max_retries, task.must_haves, task.risk_level, task.estimated_duration_minutes, 1 if task.escalated else 0, - task.stage, task.stages_json), + task.stage, task.stages_json, + 1 if task.archived else 0, task.archived_at), ) conn.execute( "INSERT INTO events (task_id, agent, event_type, detail) VALUES (?,?,?,?)", @@ -123,6 +124,8 @@ class Blackboard: updates["started_at"] = now elif new_status in ("done", "failed", "cancelled"): updates["completed_at"] = now + elif new_status == "paused": + updates["completed_at"] = now # paused 也记录时间用于恢复 elif new_status == "pending" and old_status == "failed": updates["retry_count"] = ( conn.execute("SELECT retry_count FROM tasks WHERE id=?",