Add separate kline.db and pre-seed small-account four-product K-lines on startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-02 15:22:52 +08:00
parent 972ab5d08b
commit 5328673ce8
11 changed files with 215 additions and 33 deletions
+2 -1
View File
@@ -13,9 +13,10 @@ import threading
import time
from typing import Any, Iterable, Optional, Sequence
from modules.core.paths import DB_PATH as _ROOT_DB_PATH
from modules.core.paths import DB_PATH as _ROOT_DB_PATH, KLINE_DB_PATH as _KLINE_DB_PATH
DB_PATH = _ROOT_DB_PATH
KLINE_DB_PATH = _KLINE_DB_PATH
_backend_lock = threading.Lock()
_backend: Optional[str] = None
+1
View File
@@ -29,6 +29,7 @@ class AppDeps:
start_background_threads: Callable
tz: Any
db_path: str
kline_db_path: str
upload_dir: str
open_types: list
exit_triggers: list
+1
View File
@@ -19,6 +19,7 @@ UPLOADS_DIR = ROOT / "uploads"
LOGS_DIR = ROOT / "logs"
DB_PATH = str(ROOT / "futures.db")
KLINE_DB_PATH = str(DATA_DIR / "kline.db")
def ensure_runtime_dirs() -> None: