[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Fri, 6 Oct 2023 06:35:08 -0400 (EDT) |
branch: master
commit 6c64e6034364ecbff15924e37303b9bafd22182b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 6 11:28:20 2023 +0200
database: Avoid hard-coded build status constant.
* src/cuirass/database.scm (db-get-pending-build): Replace hard-coded -2
by (build-status scheduled).
---
src/cuirass/database.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 56f452f..df5f95b 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -1603,7 +1603,8 @@ WITH pending_dependencies AS
(SELECT Builds.id, count(dep.id) as deps FROM Builds
LEFT JOIN BuildDependencies as bd ON bd.source = Builds.id
LEFT JOIN Builds AS dep ON bd.target = dep.id AND dep.status != 0
-WHERE Builds.status = -2 AND Builds.system = " system
+WHERE Builds.status = " (build-status scheduled)
+" AND Builds.system = " system
" GROUP BY Builds.id
ORDER BY Builds.priority ASC, Builds.timestamp ASC)
SELECT id FROM pending_dependencies WHERE deps = 0 LIMIT 1;"))