Handle optional Pal24 metadata fields

This commit is contained in:
Egor
2025-11-09 08:23:01 +03:00
parent 9f78335651
commit cde84ff20b
2 changed files with 21 additions and 6 deletions
+5 -2
View File
@@ -2,16 +2,19 @@ import logging
from typing import AsyncGenerator
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sessionmaker
from sqlalchemy.pool import NullPool
from sqlalchemy.pool import AsyncAdaptedQueuePool
from app.config import settings
from app.database.models import Base
logger = logging.getLogger(__name__)
QueuePool = AsyncAdaptedQueuePool
engine = create_async_engine(
settings.get_database_url(),
poolclass=NullPool,
poolclass=QueuePool,
echo=settings.DEBUG,
future=True
)