添加新的provider,旧的可以删了
This commit is contained in:
+4
-6
@@ -22,10 +22,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
# docker compose down && docker compose build --no-cache && docker compose up -d
|
||||
# docker compose down && docker compose build && docker compose up -d
|
||||
|
||||
try:
|
||||
from technical.util import resample_to_interval # type: ignore
|
||||
except ImportError: # pragma: no cover - 环境缺失依赖时自动降级
|
||||
resample_to_interval = None # type: ignore
|
||||
from technical.util import resample_to_interval # type: ignore
|
||||
|
||||
|
||||
from .storage import candle_path, ensure_storage, read_candles, write_candles_snapshot
|
||||
|
||||
@@ -450,7 +448,7 @@ DERIVED_TIMEFRAMES = [tf for tf in AVAILABLE_TIMEFRAMES if tf not in FETCH_TIMEF
|
||||
AGGREGATION_TARGETS = {tf: AGGREGATION_PLAN.get(tf, []) for tf in FETCH_TIMEFRAMES}
|
||||
BASE_TIMEFRAMES = set(FETCH_TIMEFRAMES)
|
||||
|
||||
START_FROM = os.environ.get("START_FROM", "2025-09-01") # 首次启动拉取起始日期(UTC)
|
||||
START_FROM = os.environ.get("START_FROM", "2025-01-01") # 首次启动拉取起始日期(UTC)
|
||||
POLL_FACTOR = float(os.environ.get("POLL_FACTOR", "0.5")) # 轮询间隔 = tf_ms * factor
|
||||
BACKOFF_BASE = float(os.environ.get("BACKOFF_BASE", "2.0"))
|
||||
BACKOFF_MAX = float(os.environ.get("BACKOFF_MAX", "30.0"))
|
||||
@@ -513,7 +511,7 @@ def parse_start_from_ms(val: str) -> int:
|
||||
dt = datetime.fromisoformat(val) # 允许 '2022-01-01' 或 '2022-01-01T00:00:00'
|
||||
except Exception:
|
||||
# 回退到固定日期
|
||||
dt = datetime(2025, 9, 1)
|
||||
dt = datetime(2025, 1, 1)
|
||||
return int(dt.timestamp() * 1000)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user