fix: remove unnecessary WHEREs from AcquireProvisionerJob (#5257)

This commit is contained in:
Colin Adler
2022-12-02 23:53:49 +00:00
committed by GitHub
parent 137a48c215
commit a02617b66b
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -2422,8 +2422,7 @@ WHERE
provisioner_jobs AS nested
WHERE
nested.started_at IS NULL
AND nested.canceled_at IS NULL
AND nested.completed_at IS NULL
-- Ensure the caller has the correct provisioner.
AND nested.provisioner = ANY($3 :: provisioner_type [ ])
-- Ensure the caller satisfies all job tags.
AND nested.tags <@ $4 :: jsonb
+1 -2
View File
@@ -19,8 +19,7 @@ WHERE
provisioner_jobs AS nested
WHERE
nested.started_at IS NULL
AND nested.canceled_at IS NULL
AND nested.completed_at IS NULL
-- Ensure the caller has the correct provisioner.
AND nested.provisioner = ANY(@types :: provisioner_type [ ])
-- Ensure the caller satisfies all job tags.
AND nested.tags <@ @tags :: jsonb