mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2026-01-17 11:40:39 +03:00
test form data for POST
This commit is contained in:
@@ -27,4 +27,8 @@ AsyncSessionFactory = async_sessionmaker(
|
||||
async def get_db() -> AsyncGenerator:
|
||||
async with AsyncSessionFactory() as session:
|
||||
# logger.debug(f"ASYNC Pool: {engine.pool.status()}")
|
||||
yield session
|
||||
try:
|
||||
yield session
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting database session: {e}")
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user