Files
xiaoxia-saas/infra/docker/entrypoint-worker.sh
xiaoxia 5a5c653d2c
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1m5s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m13s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m8s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 2m17s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 2m35s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 2m19s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m41s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 3m4s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m13s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 31s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 2m38s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 6m29s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 7m10s
CI/CD Pipeline / Build Staging API Image (push) Successful in 7m18s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 6m46s
CI/CD Pipeline / Integration Tests (push) Successful in 2m51s
AI Code Review / AI Code Review (pull_request) Successful in 8m5s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m5s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 3m9s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 1m2s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m3s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m12s
CI/CD Pipeline / Unit Tests (push) Successful in 13m12s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 12m19s
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 578h15m49s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 578h15m50s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 578h15m51s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 578h15m52s
CI/CD Pipeline / Production Browser E2E (push) Failing after 578h16m9s
CI/CD Pipeline / CI Gate (push) Failing after 578h16m10s
CI/CD Pipeline / Deploy Production (push) Failing after 578h16m10s
CI/CD Pipeline / Build Production Web Image (push) Failing after 578h16m11s
CI/CD Pipeline / Build Production API Image (push) Failing after 578h16m11s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 578h24m49s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 578h24m53s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 578h24m55s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 578h27m54s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 578h27m56s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 578h28m23s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 578h29m10s
CI/CD Pipeline / PR Build API Image (push) Failing after 578h29m13s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 578h29m15s
CI/CD Pipeline / Frontend Lint (push) Failing after 578h29m15s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 578h29m17s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 578h30m32s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 578h29m19s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 578h49m38s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 578h49m39s
CI/CD Pipeline / Canary Release to Production (push) Failing after 578h49m58s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 578h49m59s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 578h58m38s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 578h59m4s
CI/CD Pipeline / PR Build Web Image (push) Failing after 579h2m58s
feat(cleanup): pending 任务自动清理,防止队列占满 (#1463)
2026-08-23 12:55:39 +08:00

19 lines
663 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Worker 启动脚本 — 支持 WORKER_CONCURRENCY 环境变量
# 未设置时默认 2(保持向后兼容)
set -e
CONCURRENCY="${WORKER_CONCURRENCY:-2}"
# ⚠️ 部署约束:此 Worker 必须且只能运行单实例(replicas=1)
# -B 标志嵌入 celery beat,beat 负责定期触发 pending 超时清理等定时任务
# 多实例部署会导致每个 Worker 独立运行 Beat,造成定时任务重复执行
# 若需横向扩展 Worker,必须将 Beat 拆分为独立服务(celery beat -A worker_app.celery_app)
exec celery \
-A worker_app.celery_app \
worker \
--loglevel=info \
"-B" \
"--concurrency=${CONCURRENCY}"