auto-sync: 2026-05-18 23:23:41
This commit is contained in:
@@ -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=?",
|
||||
|
||||
Reference in New Issue
Block a user