aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-05-08 17:16:26 +0100
committerChristopher Baines <mail@cbaines.net>2020-05-08 17:16:26 +0100
commit6315b898754c3a5fbbc0e752743b33c9175489b1 (patch)
treeb8ed5375d110441e30d4c7ad48a486cd517587ef /scripts
parentc595d561896b3aa29106fb18e45fd737ab0de702 (diff)
downloadbuild-coordinator-6315b898754c3a5fbbc0e752743b33c9175489b1.tar
build-coordinator-6315b898754c3a5fbbc0e752743b33c9175489b1.tar.gz
Make a record type for the build coordinator
This is already useful to pass around the datastore, hooks and metrics registry, and will become more useful to pass around the allocator to use.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index de10b45..b894f7b 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -30,6 +30,7 @@
(guix-build-coordinator hooks)
(guix-build-coordinator utils)
(guix-build-coordinator config)
+ (guix-build-coordinator metrics)
(guix-build-coordinator datastore)
(guix-build-coordinator coordinator)
(guix-build-coordinator agent-messaging http))
@@ -324,14 +325,18 @@ processed?: ~A
(append %service-option-defaults
%base-option-defaults)
arguments))
+ (metrics-registry (make-metrics-registry))
(datastore (database-uri->datastore
(assq-ref opts 'database)
- #:metrics-registry
- coordinator-metrics-registry))
+ #:metrics-registry metrics-registry))
(hooks
`((build-success . ,(assq-ref opts 'build-success-hook))
(build-failure . ,(assq-ref opts 'build-failure-hook))
- (build-missing-inputs . ,(assq-ref opts 'build-missing-inputs-hook)))))
+ (build-missing-inputs . ,(assq-ref opts 'build-missing-inputs-hook))))
+ (build-coordinator (make-build-coordinator
+ #:datastore datastore
+ #:hooks hooks
+ #:metrics-registry metrics-registry)))
(when (assoc-ref opts 'update-database)
(datastore-update datastore))
@@ -352,5 +357,4 @@ processed?: ~A
(assq-ref opts 'port)
(assq-ref opts 'host)
(assq-ref opts 'secret-key-base)
- datastore
- hooks)))))
+ build-coordinator)))))