auto-sync: 2026-05-21 20:03:40
This commit is contained in:
+11
-4
@@ -395,10 +395,17 @@ class Ticker:
|
||||
return False
|
||||
|
||||
now = datetime.utcnow().isoformat()
|
||||
conn.execute(
|
||||
"UPDATE tasks SET status=?, updated_at=? WHERE id=?",
|
||||
(new_status, now, task_id),
|
||||
)
|
||||
# 重置到 pending 时清空 assignee(避免残留导致重复路由到同一 Agent)
|
||||
if new_status == "pending":
|
||||
conn.execute(
|
||||
"UPDATE tasks SET status=?, assignee=NULL, updated_at=? WHERE id=?",
|
||||
(new_status, now, task_id),
|
||||
)
|
||||
else:
|
||||
conn.execute(
|
||||
"UPDATE tasks SET status=?, updated_at=? WHERE id=?",
|
||||
(new_status, now, task_id),
|
||||
)
|
||||
event_type = f"task_{new_status}"
|
||||
if event_type not in EVENT_TYPES:
|
||||
event_type = "daemon_tick"
|
||||
|
||||
Reference in New Issue
Block a user