diff options
Diffstat (limited to 'guix-build-coordinator/build-allocator.scm')
-rw-r--r-- | guix-build-coordinator/build-allocator.scm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/guix-build-coordinator/build-allocator.scm b/guix-build-coordinator/build-allocator.scm index 6c9588a..9246f52 100644 --- a/guix-build-coordinator/build-allocator.scm +++ b/guix-build-coordinator/build-allocator.scm @@ -38,18 +38,22 @@ (let ((build-tags (tags-for-build build-id))) (every (match-lambda ((agent-key . agent-value) - (any - (match-lambda - ((_ . build-value) - (string=? agent-value build-value))) - (vector-fold - (lambda (_ result tag) - (if (string=? (car tag) - agent-key) - (cons tag result) - result)) - '() - build-tags)))) + (let ((matching-build-tags + (vector-fold + (lambda (_ result tag) + (if (string=? (car tag) + agent-key) + (cons tag result) + result)) + '() + build-tags))) + (if (null? matching-build-tags) + #t + (any + (match-lambda + ((_ . build-value) + (string=? agent-value build-value))) + matching-build-tags))))) (vector->list agent-tags)))))) (define* (basic-build-allocation-strategy datastore |