From a252a7fefd43b442fc25f84b748e9696da0bb230 Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 11 Dec 2025 01:19:02 -0700 Subject: [PATCH] feat(tasks): 25 workers, pool starts paused by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Increase worker replicas from 5 to 25 - Task pool now starts PAUSED on deploy, admin must click Start Pool - Prevents workers from grabbing tasks before system is ready 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/src/tasks/task-pool-state.ts | 6 ++++-- k8s/scraper-worker.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/tasks/task-pool-state.ts b/backend/src/tasks/task-pool-state.ts index 17b02a3b..de72b2d9 100644 --- a/backend/src/tasks/task-pool-state.ts +++ b/backend/src/tasks/task-pool-state.ts @@ -6,10 +6,12 @@ * task-service.ts and routes/tasks.ts. * * State is in-memory and resets on server restart. - * By default, the pool is OPEN (not paused). + * By default, the pool is PAUSED (closed) - admin must explicitly start it. + * This prevents workers from immediately grabbing tasks on deploy before + * the system is ready. */ -let taskPoolPaused = false; +let taskPoolPaused = true; export function isTaskPoolPaused(): boolean { return taskPoolPaused; diff --git a/k8s/scraper-worker.yaml b/k8s/scraper-worker.yaml index ddff6f34..2e490d22 100644 --- a/k8s/scraper-worker.yaml +++ b/k8s/scraper-worker.yaml @@ -12,7 +12,7 @@ metadata: name: scraper-worker namespace: dispensary-scraper spec: - replicas: 5 + replicas: 25 selector: matchLabels: app: scraper-worker