aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-01-02 19:06:29 +0000
committerChristopher Baines <mail@cbaines.net>2021-01-02 19:06:29 +0000
commit0ecb1066369f73e3d5da31c0bc1db98bb24836dc (patch)
tree54f4949c1a89150e58b089d0af7ce3f3743d7639
parent6f890a440e14d17c3da1373af1133b400ed5eba2 (diff)
downloadbuild-coordinator-0ecb1066369f73e3d5da31c0bc1db98bb24836dc.tar
build-coordinator-0ecb1066369f73e3d5da31c0bc1db98bb24836dc.tar.gz
Make sure to have the agent try fetching builds
Even if there are no worker threads running.
-rw-r--r--guix-build-coordinator/agent.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index 0df6c97..c91ac0f 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -208,8 +208,10 @@
(display-info))))
(while #t
- (let ((current-threads (count-threads)))
- (if (< (count-jobs) current-threads)
+ (let ((current-threads (count-threads))
+ (job-count (count-jobs)))
+ (if (or (< job-count current-threads)
+ (= job-count 0))
(let* ((queued-build-ids
(map (lambda (job-args)
(assoc-ref (car job-args) "uuid"))