Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tweak client retry settings #136

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ func NewClient(opts ...Option) (Client, error) {

// Retry settings explanation:
// Default values (retryWaitMin = 1s, retryWaitMax = 30s, retryMax = 4)
// Changed values (retryWaitMin = 2s, retryWaitMax = 10s, retryMax = 6)
// Changed values (retryWaitMin = 2s, retryWaitMax = 15s, retryMax = 6)
//
// Default values | Changed values
// Run Seconds | Run Seconds
// 0 0.000 | 0 0.000
// 1 1.000 | 1 2.000
// 2 3.000 | 2 6.000
// 3 7.000 | 3 10.000
// 4 15.000 | 4 10.000 (capped at retryWaitMax)
// | 5 10.000 (capped at retryWaitMax)
// | 6 10.000 (capped at retryWaitMax)
// 3 7.000 | 3 14.000
// 4 15.000 | 4 15.000 (capped at retryWaitMax)
// | 5 15.000 (capped at retryWaitMax)
// | 6 15.000 (capped at retryWaitMax)
//
// Maximum wait time if all attempts fail:
// Default values: 2 seconds
// Changed values: 48 seconds
// Default values: 26 seconds
// Changed values: 67 seconds
const (
//nolint:revive
retryWaitMin = 2 * time.Second
retryWaitMax = 10 * time.Second
retryWaitMax = 15 * time.Second
retryMax = 6
)
c.RetryWaitMin = retryWaitMin // Default is 1 second
Expand Down
Loading