From 459ad7d9c9bac2d94c32c7353229485f44874c27 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 10 Dec 2025 23:54:28 -0700 Subject: [PATCH] fix(tasks): Fix missing column errors in task queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change 'active' to 'is_active' in states table query (store-discovery.ts) - Remove non-existent 'active' column check from worker_tasks query (task-service.ts) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/src/tasks/handlers/store-discovery.ts | 2 +- backend/src/tasks/task-service.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/tasks/handlers/store-discovery.ts b/backend/src/tasks/handlers/store-discovery.ts index 66380aa2..017888ad 100644 --- a/backend/src/tasks/handlers/store-discovery.ts +++ b/backend/src/tasks/handlers/store-discovery.ts @@ -25,7 +25,7 @@ export async function handleStoreDiscovery(ctx: TaskContext): Promise r.code); diff --git a/backend/src/tasks/task-service.ts b/backend/src/tasks/task-service.ts index d9198690..586ea5be 100644 --- a/backend/src/tasks/task-service.ts +++ b/backend/src/tasks/task-service.ts @@ -170,7 +170,6 @@ class TaskService { WHERE id = ( SELECT id FROM worker_tasks WHERE status = 'pending' - AND active = true AND (scheduled_for IS NULL OR scheduled_for <= NOW()) -- Exclude stores that already have an active task AND (dispensary_id IS NULL OR dispensary_id NOT IN (