Fixed logging
This commit is contained in:
commit
a2942d07fe
17 changed files with 382 additions and 295 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue