mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-14 20:30:31 +02:00
Adjusted files for isort & autopep
This commit is contained in:
committed by
github-actions[bot]
parent
2940ddbdcd
commit
50031556f9
@@ -17,8 +17,14 @@ SQLALCHEMY_DATABASE_URL = f"postgresql+psycopg://{user}:{password}@{host}:{port}
|
||||
|
||||
|
||||
async_engine = create_async_engine(SQLALCHEMY_DATABASE_URL + name, pool_pre_ping=True)
|
||||
AsyncSessionLocal = sessionmaker(bind=async_engine, class_=AsyncSession,
|
||||
expire_on_commit=False, autoflush=False, autocommit=False)
|
||||
AsyncSessionLocal = sessionmaker(
|
||||
bind=async_engine,
|
||||
class_=AsyncSession,
|
||||
expire_on_commit=False,
|
||||
autoflush=False,
|
||||
autocommit=False,
|
||||
)
|
||||
|
||||
|
||||
async def get_async_db() -> AsyncGenerator[AsyncSession, None]:
|
||||
async with AsyncSessionLocal() as db:
|
||||
|
||||
Reference in New Issue
Block a user