aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-09-16 20:46:54 +0100
committerChristopher Baines <mail@cbaines.net>2020-09-16 21:19:56 +0100
commit4f17609b377c128888be6d85af46fb05fe38ce45 (patch)
tree3de81e7b2198abe0e87adc387c91adbb6a523baf /scripts
parent3530d332bd1a34f508cb25ba684622219cdc388f (diff)
downloadbuild-coordinator-4f17609b377c128888be6d85af46fb05fe38ce45.tar
build-coordinator-4f17609b377c128888be6d85af46fb05fe38ce45.tar.gz
Move more coordinator service startup out of the script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator.in15
1 files changed, 4 insertions, 11 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index 8aed241..59341cc 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -420,14 +420,10 @@ processed?: ~A
#:allocation-strategy
(assq-ref opts 'allocation-strategy))))
- (when (assoc-ref opts 'update-database)
- (datastore-update datastore))
-
- (let ((pid-file (assq-ref opts 'pid-file)))
- (when pid-file
- (call-with-output-file pid-file
- (lambda (port)
- (simple-format port "~A\n" (getpid))))))
+ (perform-coordinator-service-startup
+ build-coordinator
+ #:update-datastore? (assoc-ref opts 'update-database)
+ #:pid-file (assq-ref opts 'pid-file))
(parameterize ((%show-error-details
(assoc-ref opts 'show-error-details)))
@@ -443,9 +439,6 @@ processed?: ~A
(make-worker-thread-channel (const '())
#:parallelism 2)))
- (start-hook-processing-threads build-coordinator)
- (trigger-build-allocation build-coordinator)
-
(let ((finished? (make-condition)))
(call-with-sigint
(lambda ()