auto-sync: 2026-05-28 13:16:08
This commit is contained in:
@@ -179,7 +179,7 @@ MANUAL_STATUSES = frozenset({"cancelled", "paused"})
|
||||
VALID_TRANSITIONS = {
|
||||
"pending": {"claimed", "paused", "blocked", "cancelled"},
|
||||
"claimed": {"working", "paused", "pending", "cancelled"},
|
||||
"working": {"review", "done", "blocked", "failed", "paused", "escalated", "waiting_human", "cancelled"},
|
||||
"working": {"review", "done", "blocked", "failed", "paused", "escalated", "waiting_human", "cancelled", "pending"}, # pending: Mail spawn 失败回退
|
||||
"paused": {"working", "claimed", "review", "escalated", "waiting_human", "cancelled"}, # 恢复到 resumed_from 记录的状态
|
||||
"review": {"done", "pending", "failed", "paused", "escalated", "waiting_human", "cancelled"},
|
||||
"blocked": {"pending", "escalated", "cancelled"},
|
||||
|
||||
@@ -570,7 +570,7 @@ class Dispatcher:
|
||||
conn.commit()
|
||||
logger.info("Mail %s: reverted working → pending (spawn failed)", task_id)
|
||||
else:
|
||||
logger.debug("Mail %s: skip revert (status=%s)", task_id, row["status"] if row else "?")
|
||||
logger.debug("Mail %s: skip revert (status=%s, expected working)", task_id, row["status"] if row else "not_found")
|
||||
finally:
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user