diff options
-rw-r--r-- | scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in | 41 |
1 files changed, 23 insertions, 18 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 a6665a3..12118de 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 @@ -30,6 +30,7 @@ (json) (web uri) (web client) + (guix-build-coordinator utils) (guix-build-coordinator client-communication)) (define %guix-data-service-host "data.guix.gnu.org") @@ -126,24 +127,28 @@ derivations)) (define* (submit-build derivation #:key (priority 0)) - (let ((response - (send-submit-build-request - "http://127.0.0.1:8746" - derivation - (list - (string-append "https://" %guix-data-service-host)) - #f - priority - #t - #t - #t))) - (let ((no-build-submitted-response - (assoc-ref response "no-build-submitted"))) - (if no-build-submitted-response - (simple-format #t "skipped: ~A\n" - no-build-submitted-response) - (simple-format #t "build submitted as ~A\n" - (assoc-ref response "build-submitted")))))) + (retry-on-error + (lambda () + (let ((response + (send-submit-build-request + "http://127.0.0.1:8746" + derivation + (list + (string-append "https://" %guix-data-service-host)) + #f + priority + #t + #t + #t))) + (let ((no-build-submitted-response + (assoc-ref response "no-build-submitted"))) + (if no-build-submitted-response + (simple-format #t "skipped: ~A\n" + no-build-submitted-response) + (simple-format #t "build submitted as ~A\n" + (assoc-ref response "build-submitted")))))) + #:times 6 + #:delay 10)) (define (submit-builds-for-revision commit) (simple-format #t "looking at revision ~A\n" commit) |