This commit is contained in:
2026-09-04 19:05:23 +08:00
parent 76b422320b
commit 991d1bf343
10 changed files with 449 additions and 195 deletions

View File

@@ -38,7 +38,12 @@ class Settings(BaseSettings):
redis_url: str = ""
stocks_cache_ttl: int = 300 # 股票列表缓存秒数(行情列允许最多滞后这么多秒)
facets_cache_ttl: int = 3600 # 行业/地域筛选项缓存秒数stock_basic 很少变)
market_overview_ttl: int = 300 # 主页大盘总览缓存秒数(收盘口径数据,无需更勤)
# ---- 主页大盘总览live 层腾讯实时 + EOD 层 tushare 收盘,见 data/market_overview.py----
market_live_ttl: int = 30 # 腾讯实时行情进程内缓存秒数(成功)
market_eod_fresh_ttl: int = 14400 # EOD 层新鲜期(秒),过期走 SWR先返旧值后台刷新
market_eod_redis_ttl: int = 86400 # EOD 层 Redis TTLSWR 陈旧值的兜底存活期)
tencent_quote_timeout: float = 3.0 # 腾讯行情 HTTP 超时(秒)
sync_stats_redis_ttl: int = 43200 # 同步状态重聚合的 Redis 缓存秒数key 带版本号,同步完成即失效)
# ---- LLM智能选股的自然语言解析DeepSeekOpenAI 兼容协议,可换任意兼容网关)----
llm_base_url: str = "https://api.deepseek.com"