From 2d5608c27d77876e8c29be0cde2e625e168d965e Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 25 Jan 2024 12:47:01 +0100 Subject: [PATCH] increase retries to 10 on gsheet request --- src/delegation_backend/sheets.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/delegation_backend/sheets.go b/src/delegation_backend/sheets.go index 630db99..980d939 100644 --- a/src/delegation_backend/sheets.go +++ b/src/delegation_backend/sheets.go @@ -37,15 +37,14 @@ func RetrieveWhitelist(service *sheets.Service, log *logging.ZapEventLogger, app spId := appCfg.GsheetId resp, err = service.Spreadsheets.Values.Get(spId, readRange).Do() if err != nil { - log.Warnf("Unable to retrieve data from sheet: %v", err) return err } return nil } - - err = ExponentialBackoff(operation, maxRetries, initialBackoff) + retries := 10 + err = ExponentialBackoff(operation, retries, initialBackoff) if err != nil { - log.Fatalf("Unable to retrieve data from sheet after retries: %v", err) + log.Fatalf("Unable to retrieve data from sheet after %v retries: %v", retries, err) } return processRows(resp.Values)