From 39b3e9b88b414514f9bdb6c25b0fb717e6202b51 Mon Sep 17 00:00:00 2001 From: hmo Date: Wed, 29 Jul 2026 04:04:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20batch=5Freassess=E5=8A=A0--force?= =?UTF-8?q?=E5=85=A8=E9=87=8F=E5=BC=BA=E5=88=B6=E9=87=8D=E8=AF=84=E6=A0=87?= =?UTF-8?q?=E5=BF=97(=E6=97=81=E8=B7=AF=E5=86=B7=E5=8D=B4=E6=9C=9F+?= =?UTF-8?q?=E5=B7=B2=E6=9C=89=E5=88=86=E6=9E=90=E4=B8=A4=E9=A1=B9=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E6=A3=80=E6=9F=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/batch_reassess.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 772947f5..a7135dba 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -30,8 +30,12 @@ def has_llm_analysis(code): conn.close() return r and r[0] and r[0] > 500 +FORCE_REASSESS = "--force" in sys.argv + def in_cooldown(code): - """冷却期检查""" + """冷却期检查(--force 时全量强制重评)""" + if FORCE_REASSESS: + return False conn = sqlite3.connect(DB) r = conn.execute("SELECT reassessed_at FROM holding_strategies WHERE code=? AND status='active'", (code,)).fetchone() conn.close() @@ -600,7 +604,7 @@ def process_stock(code, force_today=False): return False # 有分析且未过期 \u2192 跳过(除非 force_today 且今早未评) - if has_llm_analysis(code) and not analysis_stale(code, force_today): + if not FORCE_REASSESS and has_llm_analysis(code) and not analysis_stale(code, force_today): print(f" \u23ed 已有12维分析且未过期,跳过") return False