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 (