aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-08-07 14:43:48 +0100
committerChristopher Baines <mail@cbaines.net>2021-08-07 14:43:48 +0100
commit0eb708c8117db8ca849348c3cfc4981948944800 (patch)
tree7f18ad6823cd2f4a1d5d23c413c616de3669b174 /guix-build-coordinator/agent.scm
parent3f6a65aeb833b937ca3da9a3270cc7bfa1627b5e (diff)
downloadbuild-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.scm28
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