diff options
author | Christopher Baines <mail@cbaines.net> | 2020-04-29 22:28:51 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-04-29 22:28:51 +0100 |
commit | 6bc76b57d4121cc11b7f4324d347b84b36ecd6bf (patch) | |
tree | 22a156d8dafe162c6bf50903397fd4598b5f1b1c | |
parent | 22896c6112965496117716b7bfe5ab14fef0a1d0 (diff) | |
download | build-coordinator-6bc76b57d4121cc11b7f4324d347b84b36ecd6bf.tar build-coordinator-6bc76b57d4121cc11b7f4324d347b84b36ecd6bf.tar.gz |
Handle exceptions in the build allocator thread
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 285240c..e8c5440 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -140,7 +140,20 @@ coordinator-metrics-registry "guixbuildcoordinator_allocate_builds_duration_seconds" (lambda () - (allocate-builds datastore))))))) + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "build-allocator-thread: exception: ~A\n" + exn)) + (lambda () + (with-exception-handler + (lambda (exn) + (backtrace) + (raise-exception exn)) + (lambda () + (allocate-builds datastore)))) + #:unwind? #t))))))) trigger-build-allocation) |