mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
roll back commented code
This commit is contained in:
parent
32c5654dd5
commit
b63473f9e6
@ -14,16 +14,16 @@ app.include_router(stuff_router)
|
|||||||
app.include_router(nonsense_router)
|
app.include_router(nonsense_router)
|
||||||
|
|
||||||
|
|
||||||
# async def start_db():
|
async def start_db():
|
||||||
# async with engine.begin() as conn:
|
async with engine.begin() as conn:
|
||||||
# await conn.run_sync(Base.metadata.create_all)
|
await conn.run_sync(Base.metadata.create_all)
|
||||||
# await engine.dispose()
|
await engine.dispose()
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("startup")
|
@app.on_event("startup")
|
||||||
async def startup_event():
|
async def startup_event():
|
||||||
logger.info("Starting up...")
|
logger.info("Starting up...")
|
||||||
# await start_db()
|
await start_db()
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("shutdown")
|
@app.on_event("shutdown")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user