From 797e8150852c010becdce54c158858174b641dda Mon Sep 17 00:00:00 2001 From: Tyler Britten <1933680+tybritten@users.noreply.github.com> Date: Mon, 24 Aug 2020 15:59:58 -0400 Subject: [PATCH] made retry settings global --- indexer.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indexer.go b/indexer.go index 44039e6..e1507cc 100644 --- a/indexer.go +++ b/indexer.go @@ -46,6 +46,11 @@ func ShouldRetry(request *http.Request, response *http.Response, withDelay time. return false } +// retry settings +var retrycount = 5 +var initialBackoff = 1 * time.Second +var retryConfig = ElasticRetries(initialBackoff, retrycount) + // CreateNewIndex creates a new index for the passed in alias. // // Note that we do not create an index with the passed name, instead creating one