From e1489703110fdaf099fb7d40bccfddf9fd2720ba Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 13 Oct 2020 18:10:12 +0100 Subject: 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. --- ...rdinator-queue-builds-from-guix-data-service.in | 26 ++++++++++++++++++++-- 1 file 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)) -- cgit v1.2.3