This commit is contained in:
2026-08-18 16:13:07 +08:00
parent efcbc49096
commit 4de893ca94
12 changed files with 906 additions and 506 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ from api.core import Exceptions, Gzip, Middleware
from api.core.Logging import configure_logging
from api.main import api_router
from config.main import config
from database.connect import close_connection_pools
configure_logging()
@@ -19,7 +20,10 @@ async def lifespan(_: FastAPI):
print('dcalc is starting...')
print('Application starting...')
print('Application startup complete.')
yield
try:
yield
finally:
await close_connection_pools()
application = FastAPI(docs_url='/doc', redoc_url=None, lifespan=lifespan)