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