auto-sync: 2026-05-24 19:53:26

This commit is contained in:
cfdaily
2026-05-24 19:53:26 +08:00
parent 8d7599d35e
commit 9e268c795a
+16
View File
@@ -848,6 +848,22 @@ class Ticker:
return reclaimed
def _mail_check_reply(self, original_task_id: str, db_path: Path) -> bool:
"""Mail 幻觉门控:检查是否有回复邮件"""
try:
conn = get_connection(db_path)
try:
row = conn.execute(
"SELECT id FROM tasks WHERE id != ? AND must_haves LIKE ? LIMIT 1",
(original_task_id, f'%{original_task_id}%'),
).fetchone()
return row is not None
finally:
conn.close()
except Exception as e:
logger.error("Mail %s: ticker reply check error: %s", original_task_id, e)
return True # 保守:查询失败假设有回复
def _check_recent_routing(self, db_path: Path, task_id: str,
action_type: str) -> bool:
"""检查最近 5 分钟内是否已 dispatch 过指定类型的路由(防重复)"""