+ добавила БД постгрес
This commit is contained in:
@@ -12,6 +12,7 @@ from fastapi.responses import JSONResponse
|
||||
from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
import uvicorn
|
||||
from .api import auth, chats, health, messages, users
|
||||
from .storage.db import init_schema
|
||||
|
||||
|
||||
# --- Логирование: структурированный stdout, без содержимого сообщений ---
|
||||
@@ -25,6 +26,7 @@ logger = logging.getLogger("app")
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
init_schema()
|
||||
logger.info("event=startup app_env=%s", os.environ.get("APP_ENV", "lab"))
|
||||
yield
|
||||
logger.info("event=shutdown_complete")
|
||||
|
||||
Reference in New Issue
Block a user