Skip to content

Commit

Permalink
Merge branch 'feature/add_exponential_backoff'
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-kelly-methods committed Nov 22, 2021
2 parents deefff3 + 4115501 commit 37c52fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v2/permissions/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c *APIClient) GetPermissionsBundle(ctx context.Context) (Bundle, error) {
if bundlerError == nil {
httpStatus = resp.StatusCode
}
log.Info(ctx, "unexpected status returned from the permissions api permissions-bundle endpoint - retrying:", log.Data{"response": httpStatus})
log.Info(ctx, "unexpected status returned from the permissions api permissions-bundle endpoint - retrying...", log.Data{"response": httpStatus, "retryInterval": backOff})
time.Sleep(backOff)
}
return permissions, bundlerError
Expand Down
4 changes: 2 additions & 2 deletions v2/permissions/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ func NewCheckerForStore(cache Cache) *Checker {
}
}

// request backoff schedule: 10/30/60 seconds
// request backoff schedule: 30/60/90 seconds
var backoffSchedule = []time.Duration{
10 * time.Second,
30 * time.Second,
60 * time.Second,
90 * time.Second,
}

// NewChecker creates a new Checker instance that uses the permissions API client, wrapped in a CachingStore
Expand Down

0 comments on commit 37c52fb

Please sign in to comment.