aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-01-14 15:24:12 +0000
committerChristopher Baines <mail@cbaines.net>2022-01-14 15:24:12 +0000
commitfcf1177d2c47a7bc489f6a836d5648a5f903cb05 (patch)
tree96fdc0122c7ec46806c40c3b1ec4295ea4a56a2f
parent21cb33a859a25ac6ba82f32e014ea642e2e62afc (diff)
downloaddata-service-fcf1177d2c47a7bc489f6a836d5648a5f903cb05.tar
data-service-fcf1177d2c47a7bc489f6a836d5648a5f903cb05.tar.gz
Don't count exiting with a status of 0 as a failure
-rw-r--r--guix-data-service/jobs.scm15
1 files changed, 8 insertions, 7 deletions
diff --git a/guix-data-service/jobs.scm b/guix-data-service/jobs.scm
index de8e456..8945e43 100644
--- a/guix-data-service/jobs.scm
+++ b/guix-data-service/jobs.scm
@@ -103,13 +103,14 @@
;; No process to wait for
#f)
((pid . status)
- (match (hash-ref processes pid)
- ((_ (id))
- (simple-format (current-error-port)
- "pid ~A (job: ~A) failed with status ~A\n"
- pid id status)
-
- (handle-job-failure id)))
+ (unless (eq? status 0)
+ (match (hash-ref processes pid)
+ ((_ (id))
+ (simple-format (current-error-port)
+ "pid ~A (job: ~A) failed with status ~A\n"
+ pid id status)
+
+ (handle-job-failure id))))
(hashv-remove! processes pid)