utils: gofumpt http retry formatting
This commit is contained in:
parent
345d4fddc9
commit
711685192c
1 changed files with 4 additions and 2 deletions
|
|
@ -10,8 +10,10 @@ import (
|
||||||
|
|
||||||
const maxRetries = 3
|
const maxRetries = 3
|
||||||
|
|
||||||
var retryDelayUnit = time.Second
|
var (
|
||||||
var maxRetrySleepDuration = 1 * time.Minute
|
retryDelayUnit = time.Second
|
||||||
|
maxRetrySleepDuration = 1 * time.Minute
|
||||||
|
)
|
||||||
|
|
||||||
func shouldRetry(statusCode int) bool {
|
func shouldRetry(statusCode int) bool {
|
||||||
return statusCode == http.StatusTooManyRequests ||
|
return statusCode == http.StatusTooManyRequests ||
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue