release: bump version to 0.39.0
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import logging
|
||||
from typing import AsyncGenerator
|
||||
|
||||
from sqlalchemy import text
|
||||
@@ -6,8 +5,9 @@ from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sess
|
||||
from sqlalchemy.orm import declarative_base
|
||||
|
||||
from app.core.config import settings
|
||||
from app.core.logging import get_logger
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger = get_logger(__name__)
|
||||
|
||||
DB_POOL_CONFIG = {
|
||||
"pool_pre_ping": True,
|
||||
@@ -111,13 +111,16 @@ async def init_db():
|
||||
import app.models.playground_message # noqa: F401
|
||||
import app.models.system_log # noqa: F401
|
||||
|
||||
logger.warning(
|
||||
"Database pool settings active: pre_ping=%s recycle=%ss size=%s overflow=%s timeout=%ss",
|
||||
DB_POOL_CONFIG["pool_pre_ping"],
|
||||
DB_POOL_CONFIG["pool_recycle"],
|
||||
DB_POOL_CONFIG["pool_size"],
|
||||
DB_POOL_CONFIG["max_overflow"],
|
||||
DB_POOL_CONFIG["pool_timeout"],
|
||||
logger.warning_event(
|
||||
"Database pool settings active",
|
||||
event="database.pool.initialized",
|
||||
context={
|
||||
"pool_pre_ping": DB_POOL_CONFIG["pool_pre_ping"],
|
||||
"pool_recycle": DB_POOL_CONFIG["pool_recycle"],
|
||||
"pool_size": DB_POOL_CONFIG["pool_size"],
|
||||
"max_overflow": DB_POOL_CONFIG["max_overflow"],
|
||||
"pool_timeout": DB_POOL_CONFIG["pool_timeout"],
|
||||
},
|
||||
)
|
||||
|
||||
async with engine.begin() as conn:
|
||||
|
||||
Reference in New Issue
Block a user