Template
mirror of
https://github.com/Nekidev/uv-fastapi-tortoise.git
synced 2026-09-12 19:57:25 +00:00
Add versioning support by default, replace _Project.md with _Summary.md and _Description.md, upgrade to the latest Tortoise ORM version
This commit is contained in:
@@ -2,13 +2,13 @@ from fastapi import FastAPI
|
||||
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
from project.db.lifespan import on_startup, on_shutdown
|
||||
from project.db import lifespan as db
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
await on_startup()
|
||||
await db.on_startup()
|
||||
|
||||
yield
|
||||
|
||||
await on_shutdown()
|
||||
await db.on_shutdown()
|
||||
|
||||
Reference in New Issue
Block a user