From 83b06c21cc5f82abdf3aba940b2eabe096ae85ef Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 11 Dec 2025 01:14:25 -0700 Subject: [PATCH 1/3] fix(tasks): Stop spinner in status cards when pool is paused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cannaiq/src/pages/TasksDashboard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cannaiq/src/pages/TasksDashboard.tsx b/cannaiq/src/pages/TasksDashboard.tsx index 09eaa439..7fb7fce6 100644 --- a/cannaiq/src/pages/TasksDashboard.tsx +++ b/cannaiq/src/pages/TasksDashboard.tsx @@ -280,7 +280,7 @@ export default function TasksDashboard() { >
- {STATUS_ICONS[status]} + {getStatusIcon(status, poolPaused)} {status}
From a252a7fefd43b442fc25f84b748e9696da0bb230 Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 11 Dec 2025 01:19:02 -0700 Subject: [PATCH 2/3] 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 From d6c602c5674dab11b62474f415086ede7c2dea85 Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 11 Dec 2025 01:29:25 -0700 Subject: [PATCH 3/3] fix(ui): Remove Cleanup Stale button from Workers page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cannaiq/src/pages/WorkersDashboard.tsx | 34 ++++++-------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/cannaiq/src/pages/WorkersDashboard.tsx b/cannaiq/src/pages/WorkersDashboard.tsx index 60a3ad31..4773894b 100644 --- a/cannaiq/src/pages/WorkersDashboard.tsx +++ b/cannaiq/src/pages/WorkersDashboard.tsx @@ -292,16 +292,6 @@ export function WorkersDashboard() { } }, []); - // Cleanup stale workers - const handleCleanupStale = async () => { - try { - await api.post('/api/worker-registry/cleanup', { stale_threshold_minutes: 2 }); - fetchData(); - } catch (err: any) { - console.error('Cleanup error:', err); - } - }; - // Remove a single worker const handleRemoveWorker = async (workerId: string) => { if (!confirm('Remove this worker from the registry?')) return; @@ -364,23 +354,13 @@ export function WorkersDashboard() { {workers.length} registered workers ({busyWorkers.length} busy, {idleWorkers.length} idle)

-
- - -
+ {error && (