Fixed logging

This commit is contained in:
Ярослав Малинин 2026-04-30 18:13:08 +03:00
commit a2942d07fe
17 changed files with 382 additions and 295 deletions

View file

@ -4,6 +4,7 @@ from fastapi import FastAPI
from src.api.external import router as ws_router
from src.agent import AgentService
from src.agent.checkpointer import create_checkpointer
from src.core.logger import get_logger
@ -11,10 +12,9 @@ logger = get_logger(__name__)
@asynccontextmanager
async def lifespan(app: FastAPI):
logger.info("Инициализация AgentService...")
AgentService() # инициализируем синглтон
logger.info("AgentService инициализирован")
yield
async with create_checkpointer():
AgentService() # инициализируем синглтон
yield
app = FastAPI(lifespan=lifespan)