diff --git a/server/worker.go b/server/worker.go index 573afea..2305cff 100644 --- a/server/worker.go +++ b/server/worker.go @@ -180,7 +180,7 @@ func updateWorkerTaskStatus(ctx context.Context) { if Workers[uuid].Connected { w := Workers[uuid] - rows, err := db.Query(ctx, "SELECT id, COALESCE(CARDINALITY(log),0) as log_offset FROM tasks WHERE worker_id = $1 AND (status = $2 OR status = $3 OR status = $4)", uuid, constants.TASK_STATUS_ASSIGNED, constants.TASK_STATUS_RUNNING, constants.TASK_STATUS_WAITING) + rows, err := db.Query(ctx, "SELECT id, COALESCE(CARDINALITY(log),0) as log_offset FROM tasks WHERE worker_id = $1 AND (status = $2 OR status = $3 OR status = $4 OR status = $5)", uuid, constants.TASK_STATUS_UNKNOWN, constants.TASK_STATUS_ASSIGNED, constants.TASK_STATUS_RUNNING, constants.TASK_STATUS_WAITING) if err != nil { slog.ErrorContext(ctx, "Error Getting Tasks for Worker", "err", err, "worker_id", uuid) return