Restructure into modules/ with single-process CTP and config/ layout.

Move business code under modules/, env template to config/, PM2 single qihuo process, and _legacy shims for old imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-01 14:42:16 +08:00
parent b354d6c701
commit e5a586f903
209 changed files with 21962 additions and 20963 deletions
+46
View File
@@ -0,0 +1,46 @@
# Copyright (c) 2025-2026 马建军. All rights reserved.
"""Shared dependencies passed into each feature module at register() time."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Callable, Optional
@dataclass
class AppDeps:
app: Any
get_db: Callable
get_setting: Callable
set_setting: Callable
login_required: Callable
require_nav: Callable
fetch_price: Callable
send_wechat_msg: Callable
touch_stats_cache: Callable
get_stats_data: Callable
build_market_quote_payload: Callable
today_str: Callable
expire_old_plans: Callable
check_order_plans: Callable
check_key_monitors: Callable
background_task: Callable
start_background_threads: Callable
tz: Any
db_path: str
upload_dir: str
open_types: list
exit_triggers: list
behavior_tags: list
kline_periods: list
kline_cutoffs: list
calc_holding_duration: Callable
holding_to_minutes: Callable
classify_close_result: Callable
calc_rr_ratio: Callable
calc_theoretical_pnl: Callable
parse_review_date_filter: Callable
trading_mode: Callable
static_asset_v: Callable
ua_is_phone: Callable