aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/coordinator.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-04-22 15:01:22 +0100
committerChristopher Baines <mail@cbaines.net>2023-04-22 15:01:22 +0100
commitcba5a6e918f2a3b9368df98a598a1d415dff94ee (patch)
treeeb7000d7cced148bd3b1e9665af20e14815c2eb2 /guix-build-coordinator/coordinator.scm
parent249b90e2430b474484356edb83b0953c8bf38f51 (diff)
downloadbuild-coordinator-cba5a6e918f2a3b9368df98a598a1d415dff94ee.tar
build-coordinator-cba5a6e918f2a3b9368df98a598a1d415dff94ee.tar.gz
Add some more exception handling around hooks
Diffstat (limited to 'guix-build-coordinator/coordinator.scm')
-rw-r--r--guix-build-coordinator/coordinator.scm26
1 files changed, 17 insertions, 9 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 67ede3f..f6889e5 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -1096,15 +1096,23 @@
" exception: " exn))
#:unwind? #t))
(lambda ()
- (while #t
- (match (datastore-list-unprocessed-hook-events datastore event-name 1)
- (()
- (wait-condition-variable condvar
- mtx
- (+ (time-second (current-time))
- wait-timeout-seconds)))
- (((id event arguments))
- (process-event id event arguments handler)))))
+ (with-throw-handler #t
+ (lambda ()
+ (while #t
+ (match (datastore-list-unprocessed-hook-events datastore event-name 1)
+ (()
+ (wait-condition-variable condvar
+ mtx
+ (+ (time-second (current-time))
+ wait-timeout-seconds)))
+ (((id event arguments))
+ (process-event id event arguments handler)))))
+ (lambda (key . args)
+ (log-msg
+ (build-coordinator-logger build-coordinator)
+ 'CRITICAL
+ "error in build allocator thread: " key " " args)
+ (backtrace))))
#:unwind? #t))))
condvar))