main.py
@@ -43,13 +43,9 @@ # 创建调度器 scheduler = BackgroundScheduler() scheduler.add_job(sync_resource,minutes=1, id="sync_resource_data") scheduler.add_job(sync_resource, 'interval', minutes=1, id="sync_resource_data") scheduler.start() @app.on_event("shutdown") async def shutdown_event(): print("Shutdown event handler") scheduler.shutdown() app.include_router(auth_router, prefix='/api/auth', tags=["auth"]) app.include_router(chat_router, prefix='/api/chat', tags=["chat"])