mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2026-01-17 11:40:39 +03:00
wip: crud refactor
This commit is contained in:
@@ -28,6 +28,7 @@ async def get_db() -> AsyncGenerator:
|
||||
# logger.debug(f"ASYNC Pool: {engine.pool.status()}")
|
||||
try:
|
||||
yield session
|
||||
await session.commit()
|
||||
except Exception as e:
|
||||
await logger.aerror(f"Error getting database session: {e}")
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user