From f4be64761073fbe9b1b07c6126104b54358c7bfb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 2 May 2024 20:41:04 +0100 Subject: [PATCH] Use a separate fiber to send pool stats As the requester might timeout. --- guix-data-service/utils.scm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm index d01fb5c..a9e8f39 100644 --- a/guix-data-service/utils.scm +++ b/guix-data-service/utils.scm @@ -244,13 +244,15 @@ (waiters . ,(length waiters)) (checkout-failure-count . ,checkout-failure-count)))) - (perform-operation - (choice-operation - (wrap-operation - (put-operation reply stats) - (const #t)) - (wrap-operation (sleep-operation 0.2) - (const #f))))) + (spawn-fiber + (lambda () + (perform-operation + (choice-operation + (wrap-operation + (put-operation reply stats) + (const #t)) + (wrap-operation (sleep-operation 1) + (const #f))))))) (loop resources available