From f0f13294610846e8d924fa24b1e96730ffd74f1d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 29 Jul 2024 11:24:08 +0100 Subject: [PATCH] Tweak timeouts in resource-pool-stats --- guix-data-service/utils.scm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm index e5b4a45..13dce82 100644 --- a/guix-data-service/utils.scm +++ b/guix-data-service/utils.scm @@ -453,7 +453,9 @@ available. Return the resource once PROC has returned." (put-operation pool `(stats ,reply)) (const #t)) (wrap-operation (sleep-operation timeout) - (const #f)))) + (lambda _ + (raise-exception + (make-resource-pool-timeout-error)))))) (let ((time-remaining (- timeout @@ -461,13 +463,13 @@ available. Return the resource once PROC has returned." start-time) internal-time-units-per-second)))) (if (> time-remaining 0) - (let ((response - (perform-operation - (choice-operation - (get-operation reply) - (wrap-operation (sleep-operation time-remaining) - (const #f)))))) - response) + (perform-operation + (choice-operation + (get-operation reply) + (wrap-operation (sleep-operation time-remaining) + (lambda _ + (raise-exception + (make-resource-pool-timeout-error)))))) (raise-exception (make-resource-pool-timeout-error))))))