Compare commits
No commits in common. "7aa6781c6d72a1e2a225ccd685c0a3753f5d499f" and "f8f8c1174f82880bd8b3ec1ed8e7d94d315c7158" have entirely different histories.
7aa6781c6d
...
f8f8c1174f
@ -16,13 +16,7 @@ DB_NAME = os.getenv("DB_NAME")
|
|||||||
|
|
||||||
DATABASE_URL = f"postgresql+asyncpg://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}"
|
DATABASE_URL = f"postgresql+asyncpg://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}"
|
||||||
|
|
||||||
engine = create_async_engine(
|
engine = create_async_engine(DATABASE_URL, echo=True, future=True)
|
||||||
DATABASE_URL,
|
|
||||||
echo=True,
|
|
||||||
future=True,
|
|
||||||
pool_pre_ping=True,
|
|
||||||
pool_recycle=300,
|
|
||||||
)
|
|
||||||
|
|
||||||
async def init_db():
|
async def init_db():
|
||||||
async with engine.begin() as conn:
|
async with engine.begin() as conn:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user