| | |
| | | from app.task.fetch_agent import sync_agents, initialize_agents, sync_agents_v2, sync_knowledge, \ |
| | | sync_resources_from_json |
| | | from app.init_config.init_run_data import sync_default_data |
| | | from app.task.sync_account_token import sync_token |
| | | |
| | | init_db() |
| | | |
| | |
| | | # 创建调度器 |
| | | scheduler = BackgroundScheduler() |
| | | scheduler.add_job(sync_agents_v2, 'interval', minutes=60, id="sync_resource_data") |
| | | scheduler.add_job(sync_token, 'interval', minutes=5, id="sync_token_1") |
| | | scheduler.start() |
| | | |
| | | app.include_router(auth_router, prefix='/api/auth', tags=["auth"]) |