migrate: remove final JSON cold backup lines, prune/branch→DB
This commit is contained in:
@@ -2540,19 +2540,6 @@ def regenerate_all(stdout=True):
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f" [DB写入失败] {e}", flush=True)
|
||||
# JSON 冷备
|
||||
json.dump(existing_pf, open(PORTFOLIO_PATH, "w"), ensure_ascii=False, indent=2)
|
||||
json.dump(wl, open(WATCHLIST_PATH, "w"), ensure_ascii=False, indent=2)
|
||||
|
||||
# 写 decisions.json
|
||||
decisions_path = "/home/hmo/web-dashboard/data/decisions.json"
|
||||
decisions_data = {
|
||||
"decisions": decisions, # 全部保留
|
||||
"total": len(decisions),
|
||||
"regenerated_at": datetime.now().strftime('%Y-%m-%d %H:%M'),
|
||||
}
|
||||
json.dump(decisions_data, open(decisions_path, "w"), ensure_ascii=False, indent=2)
|
||||
# DB 已在上方写入(和 portfolio/watchlist 一起)
|
||||
|
||||
# 记录策略→提示词版本关联
|
||||
if HAS_PROMPT_TRACKING:
|
||||
|
||||
Reference in New Issue
Block a user