aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/datastore
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/datastore')
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 80dc813..2ae6f7b 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -2003,7 +2003,12 @@ WHERE agent_id = :agent_id"
(append initially-allocated-builds
new-builds)
new-builds))
- '())))
+ ;; Previously allocate builds just returned newly allocated builds,
+ ;; but if max-builds is provided, return all the builds. This means
+ ;; the agent can handle this in a idempotent manor.
+ (if max-builds
+ initially-allocated-builds
+ '()))))
#:duration-metric-name "allocate_builds_to_agent"))
(define-method (datastore-list-allocation-plan-builds