Skip to content

Commit

Permalink
Merge pull request #36 from MinaFoundation/mitigate-google-503
Browse files Browse the repository at this point in the history
PM-1089 increase retries to 10 on gsheet request
  • Loading branch information
piotr-iohk authored Jan 25, 2024
2 parents 116b89d + 2d5608c commit 94c53c9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/delegation_backend/sheets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 94c53c9

Please sign in to comment.