database: Fix db-get-build-percentage query.

* src/cuirass/database.scm (db-get-build-percentage): Consider both successful
and failing builds.
This commit is contained in:
Mathieu Othacehe 2021-02-10 18:23:41 +01:00
parent 38701970eb
commit e77a0a94fe
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ last_build.duration AS last_duration FROM builds,
(SELECT GREATEST((stoptime - starttime), 1) AS duration FROM Builds
WHERE job_name IN
(SELECT job_name from Builds WHERE id = " build-id ")
AND status = 0
AND status >= 0
ORDER BY Builds.timestamp DESC LIMIT 1) last_build
where id = " build-id ") d;
"))