[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: Add exception handling to the process-jobs script
From: |
Christopher Baines |
Subject: |
04/06: Add exception handling to the process-jobs script |
Date: |
Thu, 7 Mar 2024 05:08:38 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit ca69d3329d57c463aef76eddc32c3172becb5c56
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Tue Mar 5 10:57:41 2024 +0000
Add exception handling to the process-jobs script
As I'm seeing this exit on beid, but I'm not sure why.
---
scripts/guix-data-service-process-jobs.in | 32 ++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/scripts/guix-data-service-process-jobs.in
b/scripts/guix-data-service-process-jobs.in
index da4f614..ae1542c 100644
--- a/scripts/guix-data-service-process-jobs.in
+++ b/scripts/guix-data-service-process-jobs.in
@@ -77,12 +77,26 @@
"process-jobs"
(lambda (conn)
(simple-format #t "Ready to process jobs...\n")
- (process-jobs conn
- #:max-processes (assq-ref opts 'max-processes)
- #:latest-branch-revision-max-processes
- (or (assq-ref opts 'latest-branch-revision-max-processes)
- (* 2 (assq-ref opts 'max-processes)))
- #:skip-system-tests?
- (assq-ref opts 'skip-system-tests)
- #:per-job-parallelism
- (assq-ref opts 'per-job-parallelism)))))
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format
+ (current-error-port)
+ "exception: ~A\n"
+ exn)
+ (exit 1))
+ (lambda ()
+ (with-throw-handler #t
+ (lambda ()
+ (process-jobs
+ conn
+ #:max-processes (assq-ref opts 'max-processes)
+ #:latest-branch-revision-max-processes
+ (or (assq-ref opts 'latest-branch-revision-max-processes)
+ (* 2 (assq-ref opts 'max-processes)))
+ #:skip-system-tests?
+ (assq-ref opts 'skip-system-tests)
+ #:per-job-parallelism
+ (assq-ref opts 'per-job-parallelism)))
+ (lambda _
+ (backtrace))))
+ #:unwind? #t))))
- branch master updated (26f517d -> 5f80856), Christopher Baines, 2024/03/07
- 02/06: Copy the port monitoring fiber from the build coordinator, Christopher Baines, 2024/03/07
- 04/06: Add exception handling to the process-jobs script,
Christopher Baines <=
- 01/06: Instrument resource pool checkout failures, Christopher Baines, 2024/03/07
- 05/06: Report the size of the guix database and WAL file, Christopher Baines, 2024/03/07
- 03/06: Further fix handling exceptions when computing channel instances, Christopher Baines, 2024/03/07
- 06/06: Allow prioritising jobs from specific repositories, Christopher Baines, 2024/03/07