增加定时服务的健康检测

This commit is contained in:
吕新雨
2026-02-09 15:39:46 +08:00
parent e980bd4e4d
commit f03d36b5e9
7 changed files with 230 additions and 11 deletions

View File

@@ -45,6 +45,12 @@ celery_app.conf.update(
# - 这里按 UTC 00:10 触发一次;具体时间可按运维习惯调整
celery_app.conf.timezone = "UTC"
celery_app.conf.beat_schedule = {
# Beat 心跳:用于 API 健康检查判断 beat 是否在跑
"ops-beat-heartbeat": {
"task": "tasks.ops.beat_heartbeat",
"schedule": crontab(minute="*/1"),
"options": {"queue": f"{prefix}:celery"},
},
"push-generate-daily-schedule": {
"task": "tasks.push.generate_daily_schedule",
"schedule": crontab(minute=10, hour=0),