From 563131917e8879dbd9148b08768925c51fff1988 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 8 Aug 2026 14:23:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Worker=20=E5=B9=B6=E5=8F=91=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=E4=BB=8E=201=20=E6=94=B9=E4=B8=BA=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy-staging-registry.sh / deploy-production.sh / deploy-production-registry.sh 三处 WORKER_CONCURRENCY 统一改为从环境变量读取,默认值 4。 此前硬编码为 1,导致 staging 和 production 各只有 1 个 Worker 并发, 与 PR #1292 的预期(4 并发)不符。 --- infra/docker/deploy-production-registry.sh | 2 +- infra/docker/deploy-production.sh | 2 +- infra/docker/deploy-staging-registry.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infra/docker/deploy-production-registry.sh b/infra/docker/deploy-production-registry.sh index 58bf933a0..f06faec2a 100755 --- a/infra/docker/deploy-production-registry.sh +++ b/infra/docker/deploy-production-registry.sh @@ -145,7 +145,7 @@ docker run -d \ --network xiaoxia-net-production \ -e APP_ENV=production \ -e APP_VERSION="$IMAGE_TAG" \ - -e WORKER_CONCURRENCY=1 \ + -e WORKER_CONCURRENCY="${WORKER_CONCURRENCY:-4}" \ -e WORKER_MAX_TASKS_PER_CHILD=100 \ -e GENERATED_FILES_DIR=/app/generated \ -e GENERATED_FILES_URL_PREFIX=/generated-files \ diff --git a/infra/docker/deploy-production.sh b/infra/docker/deploy-production.sh index 8d7812495..c1bf7b39f 100755 --- a/infra/docker/deploy-production.sh +++ b/infra/docker/deploy-production.sh @@ -81,7 +81,7 @@ export WEB_DOCKERFILE=infra/docker/web-artifact.Dockerfile export WEB_NGINX_CONF=infra/docker/nginx-production.conf docker network create xiaoxia-net-production 2>/dev/null || true -export WORKER_CONCURRENCY="${WORKER_CONCURRENCY:-1}" +export WORKER_CONCURRENCY="${WORKER_CONCURRENCY:-4}" export WORKER_MAX_TASKS_PER_CHILD="${WORKER_MAX_TASKS_PER_CHILD:-100}" if [ "${ALLOW_PRODUCTION_BUILDS:-false}" = "true" ]; then diff --git a/infra/docker/deploy-staging-registry.sh b/infra/docker/deploy-staging-registry.sh index d9f744a8a..9d3f5c729 100755 --- a/infra/docker/deploy-staging-registry.sh +++ b/infra/docker/deploy-staging-registry.sh @@ -108,7 +108,7 @@ docker run -d \ --network xiaoxia-net-staging \ -e APP_ENV=staging \ -e APP_VERSION="$IMAGE_TAG" \ - -e WORKER_CONCURRENCY=1 \ + -e WORKER_CONCURRENCY="${WORKER_CONCURRENCY:-4}" \ -e WORKER_MAX_TASKS_PER_CHILD=100 \ -e GENERATED_FILES_DIR=/app/generated \ -e GENERATED_FILES_URL_PREFIX=/generated-files \ -- 2.54.0