From 0eb708c8117db8ca849348c3cfc4981948944800 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 7 Aug 2021 14:43:48 +0100 Subject: Move retrying uploads out of the with-upload-slot region Such that the retry happens with a fresh slot (and the associated tracking information). --- guix-build-coordinator/agent.scm | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'guix-build-coordinator/agent.scm') diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index d2611b7..b75fdca 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -838,18 +838,22 @@ but the guix-daemon claims it's unavailable" #:unwind? #t)) (define (submit-one-output output-name output) - (with-upload-slot - lgr - (derivation-output-path output) - (lambda (report-bytes-sent) - (log-msg lgr 'INFO - build-id ": submitting output " - (derivation-output-path output)) - (submit-output coordinator-interface - build-id output-name - (derivation-output-path output) - #:log (build-log-procedure lgr build-id) - #:report-bytes-sent report-bytes-sent)))) + (retry-on-error + (lambda () + (with-upload-slot + lgr + (derivation-output-path output) + (lambda (report-bytes-sent) + (log-msg lgr 'INFO + build-id ": submitting output " + (derivation-output-path output)) + (submit-output coordinator-interface + build-id output-name + (derivation-output-path output) + #:log (build-log-procedure lgr build-id) + #:report-bytes-sent report-bytes-sent)))) + #:times 48 + #:delay (random 15))) (if submit-outputs? (begin -- cgit v1.2.3