aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-05-02 20:41:04 +0100
committerChristopher Baines <mail@cbaines.net>2024-05-02 20:41:04 +0100
commitf4be64761073fbe9b1b07c6126104b54358c7bfb (patch)
treecba60b608dc895e002f063a718b4e9793135c3fc
parent957727c51aafe916da34a33778fa4e8112492fd6 (diff)
downloaddata-service-master.tar
data-service-master.tar.gz
Use a separate fiber to send pool statsHEADmaster
As the requester might timeout.
-rw-r--r--guix-data-service/utils.scm16
1 files 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