[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: Don't count exiting with a status of 0 as a failure
From: |
Christopher Baines |
Subject: |
01/04: Don't count exiting with a status of 0 as a failure |
Date: |
Fri, 14 Jan 2022 10:28:19 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit fcf1177d2c47a7bc489f6a836d5648a5f903cb05
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jan 14 15:24:12 2022 +0000
Don't count exiting with a status of 0 as a failure
---
guix-data-service/jobs.scm | 15 ++++++++-------
1 file 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)