From 2041441806e11a876f76d23f9d279d2fe570c05b Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Thu, 18 Jul 2024 15:37:09 -0300 Subject: [PATCH] uploader: Retry only once per storage --- core/uploader.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/uploader.go b/core/uploader.go index aaf21ef..b07a1e9 100644 --- a/core/uploader.go +++ b/core/uploader.go @@ -5,7 +5,6 @@ import ( "bytes" "context" "fmt" - "golang.org/x/sync/errgroup" "io" "net/url" "os" @@ -14,6 +13,8 @@ import ( "strings" "time" + "golang.org/x/sync/errgroup" + "github.com/cenkalti/backoff/v4" "github.com/golang/glog" "github.com/livepeer/go-tools/drivers" @@ -38,7 +39,7 @@ func newExponentialBackOffExecutor() *backoff.ExponentialBackOff { } func UploadRetryBackoff() backoff.BackOff { - return backoff.WithMaxRetries(newExponentialBackOffExecutor(), 4) + return backoff.WithMaxRetries(newExponentialBackOffExecutor(), 1) } const segmentWriteTimeout = 5 * time.Minute