梳理main.py中的服务

This commit is contained in:
mark.tian
2025-12-08 12:31:05 +08:00
parent 43ff4aa5f9
commit 4b0ab3260a
6 changed files with 97 additions and 77 deletions

View File

@@ -27,6 +27,13 @@ celery_app.conf.update(
task_soft_time_limit=25 * 60, # 25分钟软超时
worker_prefetch_multiplier=1,
worker_max_tasks_per_child=1000,
# Beat 调度配置
beat_schedule={
'push-data-to-dtc-every-minute': {
'task': 'push_data_to_dtc',
'schedule': 120.0, # 每60秒执行一次(1分钟)
},
},
)
logger.info("🌿 Celery应用配置完成")