diff options
author | Christopher Baines <mail@cbaines.net> | 2024-11-05 09:41:46 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-11-05 09:41:46 +0000 |
commit | 717b861d31b62282f394672f95451be61dc62bcd (patch) | |
tree | 4a5dfacce527d8f1ef617d345e1a61c9eaaf1602 | |
parent | 6bf1747f5580eb582789eb7b77f17c82c6489059 (diff) | |
download | data-service-717b861d31b62282f394672f95451be61dc62bcd.tar data-service-717b861d31b62282f394672f95451be61dc62bcd.tar.gz |
Have the background resource pool users be very patient
-rw-r--r-- | guix-data-service/web/build-server/controller.scm | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/guix-data-service/web/build-server/controller.scm b/guix-data-service/web/build-server/controller.scm index 308ef99..22088b1 100644 --- a/guix-data-service/web/build-server/controller.scm +++ b/guix-data-service/web/build-server/controller.scm @@ -124,23 +124,25 @@ (define (spawn-fiber-for-handler handler) (spawn-fiber (lambda () - (call-with-resource-from-pool (background-connection-pool) - (lambda (conn) - (with-exception-handler - (lambda (exn) - (simple-format - (current-error-port) - "exception in build event handler: ~A\n" - exn)) - (lambda () - (with-throw-handler #t - (lambda () - (handler conn)) - (lambda _ - (display (backtrace) (current-error-port)) - (display "\n" (current-error-port))))) - #:unwind? #t)) - #:timeout #f)))) + (parameterize + ((resource-pool-retry-checkout-timeout (* 60 60 6))) + (call-with-resource-from-pool (background-connection-pool) + (lambda (conn) + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "exception in build event handler: ~A\n" + exn)) + (lambda () + (with-throw-handler #t + (lambda () + (handler conn)) + (lambda _ + (display (backtrace) (current-error-port)) + (display "\n" (current-error-port))))) + #:unwind? #t)) + #:timeout #f))))) (define (with-build-ids-for-status data build-ids |