fix: DB路径大面积修复——mofin_db/server/technical_analysis/strategy_tree等脚本的Path(__file__).parent/data错误指向scripts/data而非data/ 导致读写分离

- 量价分析: full_analysis输出volume_deep+成交量存储在price_history.json
- FK约束移除: holding_strategies外键->holdings阻止自选股写入
- #000850 重评已写入(止损3.74/止盈4.06/RR1.67)含量价信号
This commit is contained in:
知微
2026-07-08 12:34:39 +08:00
parent c11a11849f
commit 2762ddf3ae
58 changed files with 7664 additions and 2280 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ from mofin_db import get_conn, write_holdings_batch, write_portfolio_summary, wr
app = Flask(__name__, static_folder="static", static_url_path="")
DATA_DIR = Path(__file__).parent / "data"
DATA_DIR = Path(__file__).parent.parent / "data"
UPLOAD_DIR = Path(__file__).parent / "uploads"
# Hermes Gateway
@@ -1038,7 +1038,7 @@ def update_realtime():
pf_holdings[code]["updated_at"] = datetime.now().isoformat()
updated += 1
# 也更新 watchlist.json
# 也更新 watchlist_stocks 表(DB)
wl = read_watchlist()
wl_stocks = {s["code"]: s for s in wl.get("stocks", [])}