feat:添加colg对接功能

This commit is contained in:
2026-11-03 21:44:30 +08:00
parent 3937185d0a
commit 4709ea4328
13 changed files with 1742 additions and 79 deletions
+5
View File
@@ -9,6 +9,8 @@ from fastapi import FastAPI
from api.core import Exceptions, Gzip, Middleware
from api.core.Logging import configure_logging
from api.main import api_router
from api.utils.thirdpart_gold import close_refresh_tasks
from api.utils.gold_refresh import start_periodic_refresh, stop_periodic_refresh
from config.main import config
from database.connect import close_connection_pools
@@ -20,9 +22,12 @@ async def lifespan(_: FastAPI):
print('dcalc is starting...')
print('Application starting...')
print('Application startup complete.')
await start_periodic_refresh()
try:
yield
finally:
await stop_periodic_refresh()
await close_refresh_tasks()
await close_connection_pools()