From 1e165b77fd78887569b1bee6ade435edc18294ea Mon Sep 17 00:00:00 2001 From: cfdaily Date: Mon, 25 May 2026 12:05:46 +0800 Subject: [PATCH] auto-sync: 2026-05-25 12:05:46 --- src/daemon/ticker.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/daemon/ticker.py b/src/daemon/ticker.py index 34fce13..84f3a0f 100644 --- a/src/daemon/ticker.py +++ b/src/daemon/ticker.py @@ -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(