diff --git a/backend/controller/sql/queries.sql b/backend/controller/sql/queries.sql index 0bba950d0..0a72d5910 100644 --- a/backend/controller/sql/queries.sql +++ b/backend/controller/sql/queries.sql @@ -162,7 +162,7 @@ SELECT d.min_replicas, r.endpoint, r.labels AS runner_labels FROM deployments d - LEFT JOIN runners r on d.id = r.deployment_id AND r.state = 'assigned' + LEFT JOIN runners r on d.id = r.deployment_id AND r.state != 'dead' WHERE d.min_replicas > 0 ORDER BY d.name; diff --git a/backend/controller/sql/queries.sql.go b/backend/controller/sql/queries.sql.go index dad581739..edb0b5829 100644 --- a/backend/controller/sql/queries.sql.go +++ b/backend/controller/sql/queries.sql.go @@ -750,7 +750,7 @@ SELECT d.min_replicas, r.endpoint, r.labels AS runner_labels FROM deployments d - LEFT JOIN runners r on d.id = r.deployment_id AND r.state = 'assigned' + LEFT JOIN runners r on d.id = r.deployment_id AND r.state != 'dead' WHERE d.min_replicas > 0 ORDER BY d.name `