migrate: live_prices+mtf+capital_flow DB read/write, cleanup remaining JSON refs
This commit is contained in:
@@ -314,7 +314,7 @@ def refresh_data_prices():
|
||||
if code in prices:
|
||||
p, c, chg = prices[code]
|
||||
live["prices"][code] = {"price": p, "change_pct": chg}
|
||||
json.dump(live, open("/home/hmo/web-dashboard/data/live_prices.json", "w"), indent=2)
|
||||
# json.dump(live, ...) — 已迁移到 DB,见根 price_monitor.py
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -739,7 +739,8 @@ def run_once(round_label=""):
|
||||
|
||||
# === 3.5 资金流异常检测(2026-06-27 新增)===
|
||||
try:
|
||||
cf = json.load(open("/home/hmo/web-dashboard/data/capital_flow_cache.json"))
|
||||
from mofin_db import get_conn, read_capital_flow_cache
|
||||
cf = read_capital_flow_cache(get_conn())
|
||||
# 检查所有 active decision 中的资金流异常
|
||||
for d in active:
|
||||
code = d["code"]
|
||||
|
||||
Reference in New Issue
Block a user