fix: 重新应用scanner+promote的source_strategy补丁(deploy_guard回滚后重做)

This commit is contained in:
xxm
2026-08-17 17:35:14 +08:00
parent 394ff09003
commit 9af213c4f8
5 changed files with 21 additions and 20 deletions
@@ -156,13 +156,13 @@ def main():
for code, name, sig in hits:
reasons = (f"rsi={sig['rsi']} mcap_q={sig['mcap_q']} score={sig['score']}")
conn.execute(
"INSERT INTO candidates (code, name, sector, reason, entry_range, stop_loss, target, created_at) "
"VALUES (?,?,?,?,?,?,?,datetime('now','localtime')) "
"INSERT INTO candidates (code, name, sector, reason, entry_range, stop_loss, target, source_strategy, created_at) "
"VALUES (?,?,?,?,?,?,?,?,datetime('now','localtime')) "
"ON CONFLICT(code) DO UPDATE SET "
"name=excluded.name, sector=excluded.sector, reason=excluded.reason, "
"entry_range=excluded.entry_range, stop_loss=excluded.stop_loss, target=excluded.target",
"entry_range=excluded.entry_range, stop_loss=excluded.stop_loss, target=excluded.target, source_strategy=excluded.source_strategy",
(code, code, "s2_panic_v2", reasons,
f"{sig['price']*0.98:.2f}~{sig['price']:.2f}", sig["stop_loss"], sig["target"]))
f"{sig['price']*0.98:.2f}~{sig['price']:.2f}", sig["stop_loss"], sig["target"], "s2_panic_v2"))
inserted += 1
print(f" 🟢 {code} {name}{sig['price']} score={sig['score']} {reasons}", flush=True)
conn.commit()