auto-sync: 2026-05-25 12:05:46

This commit is contained in:
cfdaily
2026-05-25 12:05:46 +08:00
parent 2993f921c8
commit 1e165b77fd
+11 -4
View File
@@ -409,11 +409,18 @@ class Ticker:
now = datetime.utcnow().isoformat()
# 重置到 pending 时清空 assignee(避免残留导致重复路由到同一 Agent)
# 但 Mail 的 assignee 是收件人,永不清空
if new_status == "pending":
conn.execute(
"UPDATE tasks SET status=?, assignee=NULL, resumed_from=NULL, updated_at=? WHERE id=?",
(new_status, now, task_id),
)
if self._current_project_id == "_mail":
conn.execute(
"UPDATE tasks SET status=?, updated_at=? WHERE id=?",
(new_status, now, task_id),
)
else:
conn.execute(
"UPDATE tasks SET status=?, assignee=NULL, resumed_from=NULL, updated_at=? WHERE id=?",
(new_status, now, task_id),
)
elif new_status == "paused":
# 记录暂停前状态,恢复时回到原状态
conn.execute(