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:
@@ -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
|
||||
Reference in New Issue
Block a user