aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-13 19:19:04 +0100
committerChristopher Baines <mail@cbaines.net>2019-06-13 19:19:04 +0100
commit7c75591f44526a856c6780618ab08918a171feec (patch)
treebc9f8cde869eb7d8423c3f89e15d3e328ed15cfc
parent3a073d402d726252df4a19f8a79dd3d2924fde0a (diff)
downloaddata-service-7c75591f44526a856c6780618ab08918a171feec.tar
data-service-7c75591f44526a856c6780618ab08918a171feec.tar.gz
Don't show failing jobs on the index page
I'm not sure quite how to treat these yet, but for now, just stick with the previous behaviour of showing revisions which haven't been processed yet, along with the ones that have been successfully processed.
-rw-r--r--guix-data-service/model/git-repository.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix-data-service/model/git-repository.scm b/guix-data-service/model/git-repository.scm
index 305b3ec..463222c 100644
--- a/guix-data-service/model/git-repository.scm
+++ b/guix-data-service/model/git-repository.scm
@@ -46,7 +46,10 @@
"
SELECT NULL AS id, load_new_guix_revision_jobs.id AS job_id, commit, source
FROM load_new_guix_revision_jobs
-WHERE git_repository_id = $1 AND succeeded_at IS NULL
+WHERE git_repository_id = $1 AND succeeded_at IS NULL AND NOT EXISTS (
+ SELECT 1 FROM load_new_guix_revision_job_events
+ WHERE event = 'failure' AND job_id = load_new_guix_revision_jobs.id
+)
UNION
SELECT id, NULL, commit, NULL
FROM guix_revisions