From 98430df5d0730818aa6eeb72ec598c523756840e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 2 May 2023 16:06:41 +0200 Subject: Simplify starting the build coordinator This code is used in the Guix system service, and this simplification will reduce the complexity there and reduce the need to change it in the future. --- scripts/guix-build-coordinator.in | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index 8199896..f873b2c 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -992,13 +992,7 @@ tags: (exit 1)) - (let* ((metrics-registry (make-metrics-registry - #:namespace - "guixbuildcoordinator")) - (datastore (database-uri->datastore - (assq-ref opts 'database) - #:metrics-registry metrics-registry)) - (hooks (filter-map + (let* ((hooks (filter-map (lambda (name) (and=> (assq-ref opts (symbol-append name '-hook)) (lambda (value) @@ -1010,9 +1004,8 @@ tags: ((name . _) (assq-ref hooks name))) %default-hooks))) (build-coordinator (make-build-coordinator - #:datastore datastore + #:database-uri-string (assq-ref opts 'database) #:hooks hooks-with-defaults - #:metrics-registry metrics-registry #:allocation-strategy (assq-ref opts 'allocation-strategy)))) -- cgit v1.2.3