diff options
author | Christopher Baines <mail@cbaines.net> | 2021-08-07 14:43:48 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-08-07 14:43:48 +0100 |
commit | 0eb708c8117db8ca849348c3cfc4981948944800 (patch) | |
tree | 7f18ad6823cd2f4a1d5d23c413c616de3669b174 /guix-build-coordinator/agent.scm | |
parent | 3f6a65aeb833b937ca3da9a3270cc7bfa1627b5e (diff) | |
download | build-coordinator-0eb708c8117db8ca849348c3cfc4981948944800.tar build-coordinator-0eb708c8117db8ca849348c3cfc4981948944800.tar.gz |
Move retrying uploads out of the with-upload-slot region
Such that the retry happens with a fresh slot (and the associated tracking
information).
Diffstat (limited to 'guix-build-coordinator/agent.scm')
-rw-r--r-- | guix-build-coordinator/agent.scm | 28 |
1 files changed, 16 insertions, 12 deletions
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 |