diff options
author | Christopher Baines <mail@cbaines.net> | 2023-02-21 12:42:12 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-02-21 12:42:12 +0000 |
commit | c29a46e8d298d3a1f16b2d4f75fa96759741afb8 (patch) | |
tree | 66cefadad19bb8366fb7593fc302f858c72ffbb3 /scripts | |
parent | 8ea7588eeab9b264645939a312bf0051be10acef (diff) | |
download | build-coordinator-c29a46e8d298d3a1f16b2d4f75fa96759741afb8.tar build-coordinator-c29a46e8d298d3a1f16b2d4f75fa96759741afb8.tar.gz |
Support skipping updating derived priorities when cancelling builds
Since this is quite expensive and can be unnecessary when you're cancelling a
specific batch of builds where you know the prioritisation won't affect the
remaining builds.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-build-coordinator.in | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index c892fe3..d2f2c8a 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -269,7 +269,12 @@ (cons arg (or (assq-ref result 'not-systems) '())) - (alist-delete 'not-systems result)))))) + (alist-delete 'not-systems result)))) + (option '("skip-updating-derived-priorities") #f #f + (lambda (opt name _ result) + (alist-cons 'skip-updating-derived-priorities + #t + result))))) (define %build-cancel-option-defaults `((tags . ()) @@ -632,14 +637,18 @@ tags: (for-each (lambda (id) (send-cancel-build-request (assq-ref opts 'coordinator) - id) + id + #:skip-updating-derived-priorities? + (assq-ref opts 'skip-updating-derived-priorities)) (report)) matching-builds))) (loop (get-batch))))))) ((build-id) (send-cancel-build-request (assq-ref opts 'coordinator) - build-id))))) + build-id + #:skip-updating-derived-priorities? + (assq-ref opts 'skip-updating-derived-priorities)))))) (("build" "update-priority" rest ...) (let ((opts (parse-options (append %client-options %base-options |