aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-05-24 12:09:47 +0100
committerChristopher Baines <mail@cbaines.net>2022-05-24 12:09:47 +0100
commit6caee98dbd8d72a55d510da86b197470b48d7c15 (patch)
tree338a95bd883b72510c69baf9b90b2850eeeba170 /scripts
parent61bb32ab2115d91e0d710d42d093926442afac30 (diff)
downloadbuild-coordinator-6caee98dbd8d72a55d510da86b197470b48d7c15.tar
build-coordinator-6caee98dbd8d72a55d510da86b197470b48d7c15.tar.gz
Check the processed derivations when queuing builds, not before
As this should work better when multiple threads are used.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in41
1 files changed, 20 insertions, 21 deletions
diff --git a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
index 1b4913a..3de78fe 100644
--- a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
+++ b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
@@ -212,31 +212,30 @@
system))))
(let ((unprocessed-package-derivations
- (filter (lambda (derivation)
- (not (hash-ref processed-derivations-hash derivation)))
- ;; Only request derivations in one thread at a time, just
- ;; in cause doing this in parallel could lead to timeouts
- (monitor
- (log-msg 'INFO "requesting package derivations for "
- system "=>" target " (" commit ")")
- (package-derivations-for-commit guix-data-service
- commit
- #:system system
- #:target target)))))
+ ;; Only request derivations in one thread at a time, just
+ ;; in cause doing this in parallel could lead to timeouts
+ (monitor
+ (log-msg 'INFO "requesting package derivations for "
+ system "=>" target " (" commit ")")
+ (package-derivations-for-commit guix-data-service
+ commit
+ #:system system
+ #:target target))))
(log-msg 'INFO "submitting package builds for "
system "=>" target " (" commit ")")
(for-each (lambda (derivation)
- (submit-build coordinator
- guix-data-service
- derivation
- #:priority
- (priority-for-derivation 'package
- system
- target)
- #:log-prefix
- (simple-format #f "package (~A=>~A): ~A: "
- system target derivation)))
+ (unless (hash-ref processed-derivations-hash derivation)
+ (submit-build coordinator
+ guix-data-service
+ derivation
+ #:priority
+ (priority-for-derivation 'package
+ system
+ target)
+ #:log-prefix
+ (simple-format #f "package (~A=>~A): ~A: "
+ system target derivation))))
unprocessed-package-derivations)
(record-derivations-as-processed unprocessed-package-derivations))))
systems-and-targets))