Merge pull request 'fix: auto repair bugs #54' (#2) from fix/auto-20260228-143852 into main
Some checks failed
Build and Deploy Log Center / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy Log Center / build-and-deploy (push) Has been cancelled
Merge PR #2 (approved via Log Center)
This commit is contained in:
commit
7aa6781c6d
@ -16,7 +16,13 @@ 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(DATABASE_URL, echo=True, future=True)
|
engine = create_async_engine(
|
||||||
|
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