diff options
author | Christopher Baines <mail@cbaines.net> | 2024-07-29 11:24:24 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-07-29 11:24:24 +0100 |
commit | d8ade0ea11a93011385208ea1cd1e2f2230fe6ba (patch) | |
tree | 48a55d2f1d5de05eb00cf39030a689dde647b2a1 /guix-data-service/web | |
parent | f0f13294610846e8d924fa24b1e96730ffd74f1d (diff) | |
download | data-service-d8ade0ea11a93011385208ea1cd1e2f2230fe6ba.tar data-service-d8ade0ea11a93011385208ea1cd1e2f2230fe6ba.tar.gz |
Fix the pool metrics
Diffstat (limited to 'guix-data-service/web')
-rw-r--r-- | guix-data-service/web/server.scm | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index d56066e..1be3ef4 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -101,7 +101,6 @@ (%guix-data-service-metrics-registry registry) (let ((finished? (make-condition)) - (render-metrics (make-render-metrics registry)) (request-scheduler #f)) (call-with-sigint (lambda () @@ -218,27 +217,28 @@ port. Also, the port used can be changed by passing the --port option.\n" conn))) request-scheduler) - (run-server/patched - (lambda (request body) - (metric-increment requests-metric) - - (let ((reply (make-channel))) - (spawn-fiber - (lambda () - (call-with-values - (lambda () - (handler request finished? body controller - secret-key-base - startup-completed - render-metrics)) - (lambda vals - (put-message reply vals)))) - request-scheduler - #:parallel? #t) - - (apply values (get-message reply)))) - #:host host - #:port port)) + (let ((render-metrics (make-render-metrics registry))) + (run-server/patched + (lambda (request body) + (metric-increment requests-metric) + + (let ((reply (make-channel))) + (spawn-fiber + (lambda () + (call-with-values + (lambda () + (handler request finished? body controller + secret-key-base + startup-completed + render-metrics)) + (lambda vals + (put-message reply vals)))) + request-scheduler + #:parallel? #t) + + (apply values (get-message reply)))) + #:host host + #:port port))) #:unwind? #t))) ;; Guile sometimes just seems to stop listening on the port, so try |