diff --git a/.github/workflows/test-server.yml b/.github/workflows/test-server.yml index dcada15ed..c303f5883 100644 --- a/.github/workflows/test-server.yml +++ b/.github/workflows/test-server.yml @@ -310,6 +310,7 @@ jobs: TEST_SUITE_WEBSITE: ${{ secrets.TEST_SUITE_WEBSITE }} NUQ_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres NUQ_RABBITMQ_URL: amqp://localhost:5672 + NUQ_WORKER_COUNT: 12 HOST: 0.0.0.0 steps: - uses: actions/checkout@v5 diff --git a/apps/api/src/harness.ts b/apps/api/src/harness.ts index 513a1ea73..c5ea958b0 100644 --- a/apps/api/src/harness.ts +++ b/apps/api/src/harness.ts @@ -96,6 +96,8 @@ const EXTRACT_WORKER_PORT = process.env.EXTRACT_WORKER_PORT ?? "3004"; const NUQ_WORKER_START_PORT = Number( process.env.NUQ_WORKER_START_PORT ?? "3006", ); +const NUQ_WORKER_COUNT = Number(process.env.NUQ_WORKER_COUNT ?? "5"); +const NUQ_PREFETCH_WORKER_PORT = NUQ_WORKER_START_PORT + NUQ_WORKER_COUNT; const logger = { section(message: string) { @@ -611,7 +613,7 @@ async function startServices(command?: string[]): Promise { }, ); - const nuqWorkers = Array.from({ length: 5 }, (_, i) => + const nuqWorkers = Array.from({ length: NUQ_WORKER_COUNT }, (_, i) => execForward( `nuq-worker-${i}`, process.argv[2] === "--start-docker" @@ -632,7 +634,7 @@ async function startServices(command?: string[]): Promise { ? "node --import ./dist/src/otel.js dist/src/services/worker/nuq-prefetch-worker.js" : "pnpm nuq-prefetch-worker:production", { - NUQ_PREFETCH_WORKER_PORT: String(3011), + NUQ_PREFETCH_WORKER_PORT: String(NUQ_PREFETCH_WORKER_PORT), NUQ_REDUCE_NOISE: "true", NUQ_POD_NAME: "nuq-prefetch-worker-0", NUQ_PREFETCH_REPLICAS: String(1),