aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/coordinator.scm20
-rw-r--r--scripts/guix-build-coordinator.in11
2 files changed, 16 insertions, 15 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 7f28f13..04cb498 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -315,12 +315,20 @@
(define (build-coordinator-get-state-id build-coordinator)
((build-coordinator-get-state-id-proc build-coordinator)))
-(define* (make-build-coordinator #:key datastore hooks
- (metrics-registry (make-metrics-registry
- #:namespace
- "guixbuildcoordinator"))
- (allocation-strategy
- basic-build-allocation-strategy))
+(define* (make-build-coordinator
+ #:key
+ database-uri-string
+ (metrics-registry
+ (make-metrics-registry
+ #:namespace
+ "guixbuildcoordinator"))
+ (datastore
+ (database-uri->datastore
+ database-uri-string
+ #:metrics-registry metrics-registry))
+ hooks
+ (allocation-strategy
+ basic-build-allocation-strategy))
(and (or (list? hooks)
(begin
(simple-format
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))))