aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/server.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-data-service/web/server.scm')
-rw-r--r--guix-data-service/web/server.scm40
1 files changed, 20 insertions, 20 deletions
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm
index 84a0e6b..b14a929 100644
--- a/guix-data-service/web/server.scm
+++ b/guix-data-service/web/server.scm
@@ -68,9 +68,6 @@
(define registry
(make-metrics-registry #:namespace "guixdataservice"))
- (define render-metrics
- (make-render-metrics registry))
-
(%database-metrics-registry registry)
(let ((finished? (make-condition)))
@@ -97,26 +94,29 @@
(resource-pool-default-timeout 10))
- (with-exception-handler
- (lambda (exn)
- (simple-format
- (current-error-port)
- "\n
+ (let ((render-metrics
+ (make-render-metrics registry)))
+
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format
+ (current-error-port)
+ "\n
error: guix-data-service could not start: ~A
Check if it's already running, or whether another process is using that
port. Also, the port used can be changed by passing the --port option.\n"
- exn)
- (primitive-exit 1))
- (lambda ()
- (run-server/patched
- (lambda (request body)
- (handler request body controller
- secret-key-base
- startup-completed
- render-metrics))
- #:host host
- #:port port))
- #:unwind? #t))
+ exn)
+ (primitive-exit 1))
+ (lambda ()
+ (run-server/patched
+ (lambda (request body)
+ (handler request body controller
+ secret-key-base
+ startup-completed
+ render-metrics))
+ #:host host
+ #:port port))
+ #:unwind? #t)))
(wait finished?))))
finished?)))