From aa85fc218e70ea67032b77a85744623f973e4ffd Mon Sep 17 00:00:00 2001 From: xxm Date: Thu, 6 Aug 2026 00:25:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=AB=E6=8F=8F=E5=99=A8=E5=B9=82?= =?UTF-8?q?=E7=AD=89=E6=A3=80=E6=9F=A5=E8=AF=AF=E4=BC=A4=E2=80=94=E2=80=94?= =?UTF-8?q?watchlist=E5=9B=9E=E5=BD=92=E6=B1=A0=E4=B8=8D=E7=AE=97=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E4=BA=A7=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - watchlist_auto_exit回归池硬编码sector='v_mr', 污染幂等检查 - 导致ADX在甜区(28.2)时v_weak整天被误判'已扫过'而跳过 - 幂等收紧为只认扫描器自己的reason格式(v_weak/v_mr精选/S2恐慌买) --- deploy/profile-scripts/mr_scanner.py | 5 ++++- deploy/profile-scripts/s2_scanner.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/mr_scanner.py b/deploy/profile-scripts/mr_scanner.py index 22e4c3d1..da1b9240 100644 --- a/deploy/profile-scripts/mr_scanner.py +++ b/deploy/profile-scripts/mr_scanner.py @@ -356,8 +356,11 @@ def main(): _conn = _sq.connect(str(DB_PATH), timeout=5) try: _today = datetime.now().strftime("%Y-%m-%d") + # 幂等只认扫描器自己写的候选(reason以v_weak/v_mr精选开头) + # —— watchlist_auto_exit 回归池也写 sector='v_mr',不能算数(2026-08-05 bug修复) _n = _conn.execute( - "SELECT COUNT(*) FROM candidates WHERE sector='v_mr' AND substr(created_at,1,10)=?", + "SELECT COUNT(*) FROM candidates WHERE sector='v_mr' AND substr(created_at,1,10)=?" + " AND (reason LIKE 'v_weak%' OR reason LIKE 'v_mr精选%')", (_today,)).fetchone()[0] except Exception: _n = 0 diff --git a/deploy/profile-scripts/s2_scanner.py b/deploy/profile-scripts/s2_scanner.py index 50c26cdc..19699440 100644 --- a/deploy/profile-scripts/s2_scanner.py +++ b/deploy/profile-scripts/s2_scanner.py @@ -164,7 +164,8 @@ def main(): try: _today = datetime.now().strftime("%Y-%m-%d") _n = conn.execute( - "SELECT COUNT(*) FROM candidates WHERE sector='s2_panic' AND substr(created_at,1,10)=?", + "SELECT COUNT(*) FROM candidates WHERE sector='s2_panic' AND substr(created_at,1,10)=?" + " AND reason LIKE 'S2恐慌买%'", (_today,)).fetchone()[0] except Exception: _n = 0