This commit is contained in:
zlwu committed 2026-08-11 11:13:01 +08:00
1 parent 80138c6388
commit 693e8a678e
682 files changed
+211375 -5306

No files matched your search

+12
View File
@@ -30,8 +30,20 @@ async def lifespan(app: FastAPI):
except Exception as e:
logging.warning("定时任务调度器启动失败: %s", e)
from app.services.cn_holiday_sync import start_cn_holiday_sync_loop, stop_cn_holiday_sync_loop
try:
start_cn_holiday_sync_loop(SessionLocal)
except Exception as e:
logging.warning("节假日同步线程启动失败: %s", e)
yield
try:
stop_cn_holiday_sync_loop()
except Exception:
pass
from app.tasks import shutdown_scheduler
try: