fix: 扫描器幂等检查误伤——watchlist回归池不算扫描产出
- watchlist_auto_exit回归池硬编码sector='v_mr', 污染幂等检查 - 导致ADX在甜区(28.2)时v_weak整天被误判'已扫过'而跳过 - 幂等收紧为只认扫描器自己的reason格式(v_weak/v_mr精选/S2恐慌买)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user