diff options
author | Christopher Baines <mail@cbaines.net> | 2023-07-08 09:40:03 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-07-08 09:40:03 +0100 |
commit | 888cb5648e0213664bea80c9b43ffd447a07e514 (patch) | |
tree | e8d6c0ef05c50b9bee3da967c3a09211d419a340 | |
parent | 734adc125b797f45f871e05861328381ea3764c9 (diff) | |
download | build-coordinator-888cb5648e0213664bea80c9b43ffd447a07e514.tar build-coordinator-888cb5648e0213664bea80c9b43ffd447a07e514.tar.gz |
Add some retrying when performing bulk operations
-rw-r--r-- | scripts/guix-build-coordinator.in | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index 2eea161..9aa4749 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -642,14 +642,18 @@ tags: (for-each (lambda (id) (let ((result - (send-cancel-build-request - (assq-ref opts 'coordinator) - id - #:skip-updating-derived-priorities? - (assq-ref opts 'skip-updating-derived-priorities) - #:ignore-if-build-required-by-another? - (assq-ref - opts 'ignore-if-build-required-by-another)))) + (retry-on-error + (lambda () + (send-cancel-build-request + (assq-ref opts 'coordinator) + id + #:skip-updating-derived-priorities? + (assq-ref opts 'skip-updating-derived-priorities) + #:ignore-if-build-required-by-another? + (assq-ref + opts 'ignore-if-build-required-by-another))) + #:times 6 + #:delay 5))) (unless (string=? (assoc-ref result "result") "build-canceled") (simple-format #t "~A\n" @@ -714,11 +718,15 @@ tags: (current-error-port)) (lambda (report) (for-each (lambda (id) - (send-update-build-priority-request - (assq-ref opts 'coordinator) - id - (assq-ref opts 'new-priority)) - (report)) + (retry-on-error + (lambda () + (send-update-build-priority-request + (assq-ref opts 'coordinator) + id + (assq-ref opts 'new-priority)) + (report)) + #:times 6 + #:delay 5)) matching-builds))))) ((build-id) (send-update-build-priority-request (assq-ref opts 'coordinator) |