Have the background resource pool users be very patient

This commit is contained in:
Christopher Baines 2024-11-05 09:41:46 +00:00
parent 6bf1747f55
commit 717b861d31

View file

@ -124,23 +124,25 @@
(define (spawn-fiber-for-handler handler) (define (spawn-fiber-for-handler handler)
(spawn-fiber (spawn-fiber
(lambda () (lambda ()
(call-with-resource-from-pool (background-connection-pool) (parameterize
(lambda (conn) ((resource-pool-retry-checkout-timeout (* 60 60 6)))
(with-exception-handler (call-with-resource-from-pool (background-connection-pool)
(lambda (exn) (lambda (conn)
(simple-format (with-exception-handler
(current-error-port) (lambda (exn)
"exception in build event handler: ~A\n" (simple-format
exn)) (current-error-port)
(lambda () "exception in build event handler: ~A\n"
(with-throw-handler #t exn))
(lambda () (lambda ()
(handler conn)) (with-throw-handler #t
(lambda _ (lambda ()
(display (backtrace) (current-error-port)) (handler conn))
(display "\n" (current-error-port))))) (lambda _
#:unwind? #t)) (display (backtrace) (current-error-port))
#:timeout #f)))) (display "\n" (current-error-port)))))
#:unwind? #t))
#:timeout #f)))))
(define (with-build-ids-for-status data (define (with-build-ids-for-status data
build-ids build-ids