diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-21 22:05:30 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-21 22:05:30 +0100 |
commit | f3475b5b015e14aaf63e42bc4332d7c8067c96bc (patch) | |
tree | 26e91d599a63a36f61c06c372ab675b4fa7eebab /guix-build-coordinator/agent.scm | |
parent | faaae80a4f10667407c34c4df56382260d5dd702 (diff) | |
download | build-coordinator-f3475b5b015e14aaf63e42bc4332d7c8067c96bc.tar build-coordinator-f3475b5b015e14aaf63e42bc4332d7c8067c96bc.tar.gz |
Make sure to count all the jobs
Otherwise jobs could be fetched needlessly.
Diffstat (limited to 'guix-build-coordinator/agent.scm')
-rw-r--r-- | guix-build-coordinator/agent.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index 20bd74a..e316b7b 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -82,7 +82,7 @@ (assoc-ref build "uuid") pre-build-status)))))) - (let-values (((process-job-with-queue count-running-jobs) + (let-values (((process-job-with-queue count-jobs) (create-work-queue max-parallel-builds process-job))) (let ((details (submit-status coordinator-uri uuid password 'idle))) @@ -93,9 +93,9 @@ builds))) (while #t - (let ((running-jobs (count-running-jobs))) - (when (< running-jobs max-parallel-builds) - (match (fetch-new-jobs (- max-parallel-builds running-jobs)) + (let ((jobs (count-jobs))) + (when (< jobs max-parallel-builds) + (match (fetch-new-jobs (- max-parallel-builds jobs)) (() ;; No new jobs available (sleep 30)) |