fix: lib 迁移后中控数据路径指向 manual_trading_hub

修复 hub_fund_history 等模块误读 lib/hub/manual_trading_hub 导致资金概况历史曲线丢失的问题。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-02 16:28:36 +08:00
parent 5797d49d8a
commit 55261b7812
7 changed files with 29 additions and 16 deletions
+3 -3
View File
@@ -44,9 +44,9 @@ def default_db_path() -> Path:
raw = (os.getenv("HUB_KLINE_DB_PATH") or "").strip()
if raw:
return Path(raw)
hub_dir = Path(__file__).resolve().parent / "manual_trading_hub" / "data"
hub_dir.mkdir(parents=True, exist_ok=True)
return hub_dir / "hub_kline.db"
from lib.paths import hub_data_dir
return hub_data_dir() / "hub_kline.db"
def _connect(db_path: Path | None = None) -> sqlite3.Connection: