fix(worker): 修复 healthcheck,容器无 pgrep 改用 Python 检查进程
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 156h46m23s
CI/CD Pipeline / Frontend Lint (push) Failing after 156h47m53s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 156h48m0s

This commit is contained in:
2026-07-03 00:06:32 +08:00
parent f243a723c4
commit 7fc72f5888
+1 -1
View File
@@ -122,7 +122,7 @@ services:
# 健康检查配置
# 注:celery inspect ping 依赖 broker 连接,在容器内不可靠,改用进程检查
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'celery.*worker' || exit 1"]
test: ["CMD-SHELL", "python3 -c "import os,sys;sys.exit(0 if any(b'celery' in open(f'/proc/{p}/cmdline','rb').read() for p in os.listdir('/proc') if p.isdigit()) else 1)""]
interval: 30s
timeout: 10s
retries: 3