diff options
author | Christopher Baines <mail@cbaines.net> | 2020-10-13 18:10:12 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-10-13 18:10:12 +0100 |
commit | e1489703110fdaf099fb7d40bccfddf9fd2720ba (patch) | |
tree | 44624d549f4964cc9a5ae7044184468a57825986 /scripts | |
parent | a0398a82e0adc798bca69a706ec6dec303ac2ccb (diff) | |
download | build-coordinator-e1489703110fdaf099fb7d40bccfddf9fd2720ba.tar build-coordinator-e1489703110fdaf099fb7d40bccfddf9fd2720ba.tar.gz |
Tweak the prioritisation of derivations
These are my own requirements, which isn't ideal. I was already thinking this
script shouldn't be part of this repository. Maybe there could be some
configuration through passing in Guile code though, that may give the desired
flexibility.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in | 26 |
1 files changed, 24 insertions, 2 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 69e320d..d379c4b 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 @@ -171,6 +171,19 @@ #:times 30 #:delay 30)) +(define (priority-for-derivation type system target) + (cond + ((eq? type 'channel-instance) + (if (string=? system "x86_64-linux") + 1000 + 500)) + ((eq? type 'package) + (if (string=? system "x86_64-linux") + 500 + 0)) + (else + 0))) + (define* (submit-builds-for-revision coordinator guix-data-service commit @@ -187,7 +200,10 @@ (submit-build coordinator guix-data-service derivation - #:priority 1000)) + #:priority + (priority-for-derivation 'channel-instance + system + target))) (channel-instance-derivations-for-commit guix-data-service commit system)))) @@ -201,7 +217,13 @@ #:target target)))) (for-each (lambda (derivation) - (submit-build coordinator guix-data-service derivation)) + (submit-build coordinator + guix-data-service + derivation + #:priority + (priority-for-derivation 'package + system + target))) unprocessed-package-derivations) (record-derivations-as-processed unprocessed-package-derivations)))) systems-and-targets)) |