feat: lifespan에 strategy_cfg.auto_init() 추가
This commit is contained in:
@@ -354,6 +354,14 @@ async def lifespan(app: FastAPI):
|
||||
except Exception as e:
|
||||
logger.warning(f"⚠️ loss_tracker 초기화 실패 (non-critical): {e}")
|
||||
|
||||
# ── 전략 파라미터 DB 초기화 (config.py 기본값 → strategy_configs 테이블 seed) ──
|
||||
try:
|
||||
from app.services.strategy_config_service import strategy_cfg
|
||||
await strategy_cfg.auto_init()
|
||||
except Exception as e:
|
||||
logger.warning(f"⚠️ strategy_cfg 초기화 실패 (non-critical): {e}")
|
||||
# ────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
try:
|
||||
from app.models.models import StockAnalysis, TradeHistory, Portfolio
|
||||
from sqlalchemy import delete
|
||||
|
||||
Reference in New Issue
Block a user