aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-10 08:32:15 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-12 20:07:22 +0000
commit156b7eea7e7d538e332d8cfcf482c5ebec0a25c0 (patch)
treeac6e28329b9f3c773683b3d7f3e98453144de848 /guix-data-service
parentaf948de6460d0b5c77e8bed086107154cd5e65dd (diff)
downloaddata-service-156b7eea7e7d538e332d8cfcf482c5ebec0a25c0.tar
data-service-156b7eea7e7d538e332d8cfcf482c5ebec0a25c0.tar.gz
Improve the select-build-stats function
Account for equivalent derivations, rather than counting them as unknown.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/model/build.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix-data-service/model/build.scm b/guix-data-service/model/build.scm
index ebdfd45..a5c535a 100644
--- a/guix-data-service/model/build.scm
+++ b/guix-data-service/model/build.scm
@@ -15,8 +15,10 @@
(define query
"
SELECT latest_build_status.status AS build_status, COUNT(*)
-FROM derivations
-LEFT JOIN builds ON builds.derivation_file_name = derivations.file_name
+FROM derivation_output_details_sets
+LEFT JOIN builds
+ ON builds.derivation_output_details_set_id =
+ derivation_output_details_sets.id
LEFT JOIN
(
SELECT DISTINCT ON (build_id) *