fix celery

This commit is contained in:
penghanyuan
2026-02-11 18:34:22 +01:00
parent 80259f111a
commit 5f81e3bf26

View File

@@ -85,7 +85,7 @@ services:
max-size: "10m"
max-file: "3"
# Celery Worker后台任务处理禁用健康检查避免与 api 共用镜像的 8000 端口检查冲突
# Celery Worker后台任务处理禁用镜像内置的 8000 端口健康检查,改用 celery inspect ping
celery-worker:
build:
context: .
@@ -106,6 +106,12 @@ services:
condition: service_healthy
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "celery -A tasks.celery_app inspect ping --timeout 10 2>/dev/null | grep -q pong || exit 1"]
interval: 30s
timeout: 15s
retries: 3
start_period: 30s
networks:
- life-echo-network
logging: