aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/build-allocator.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-11-12 14:11:15 +0000
committerChristopher Baines <mail@cbaines.net>2021-11-13 10:52:02 +0000
commit6e4fb6d7cd7454874d16840cb766ecfdc012e441 (patch)
tree16c49460547605f3544dd625ff4026c037116c51 /guix-build-coordinator/build-allocator.scm
parent74a5e012e467d281d8fdb6ac0e1713ae7b8859b9 (diff)
downloadbuild-coordinator-6e4fb6d7cd7454874d16840cb766ecfdc012e441.tar
build-coordinator-6e4fb6d7cd7454874d16840cb766ecfdc012e441.tar.gz
Only include active agents in the build allocation plan
Diffstat (limited to 'guix-build-coordinator/build-allocator.scm')
-rw-r--r--guix-build-coordinator/build-allocator.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix-build-coordinator/build-allocator.scm b/guix-build-coordinator/build-allocator.scm
index 31f3865..62e9bc9 100644
--- a/guix-build-coordinator/build-allocator.scm
+++ b/guix-build-coordinator/build-allocator.scm
@@ -80,7 +80,9 @@
(mlambda (output)
(datastore-list-builds-for-output datastore output)))
- (let* ((agents (datastore-list-agents datastore))
+ (let* ((agents (filter (lambda (agent)
+ (assoc-ref agent 'active))
+ (datastore-list-agents datastore)))
(agent-tags (map (lambda (agent-details)
(let ((agent-id (assq-ref agent-details 'uuid)))
(cons agent-id
@@ -463,7 +465,9 @@
(make-gauge-metric metrics-registry
name)))))
- (let* ((agents (datastore-list-agents datastore))
+ (let* ((agents (filter (lambda (agent)
+ (assoc-ref agent 'active))
+ (datastore-list-agents datastore)))
(agent-tags (map (lambda (agent-details)
(let ((agent-id (assq-ref agent-details 'uuid)))
(cons agent-id