feat: batch_reassess加--force全量强制重评标志(旁路冷却期+已有分析两项跳过检查)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user