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: request retry mechanics #926

Merged
merged 2 commits into from
Oct 17, 2022
Merged

feat: request retry mechanics #926

merged 2 commits into from
Oct 17, 2022

Conversation

nd0ut
Copy link
Member

@nd0ut nd0ut commented Oct 6, 2022

let newSettings = {
  // number of retry attempts for network errors
  retryAttempts: 3,
  // initial timeout between retry attempts
  retryBaseTimeout: 1000,
  // factor for calculation of the subsequent timeout
  // the formula for each retry is as follows - retryBaseTimeout * retryFactor ** currentAttempt
  // currentAttempt starts from zero
  // i.e. by default, the first retry starts after 1s, the second after 2s, and the third after 4s.
  retryFactor: 2,
  
  // number of retry attempts during throttling
  // in this case we get a timeout from the server, so the settings above are not taken into account
  retryThrottledAttempts: 10,
}

@nd0ut nd0ut merged commit 218f6b9 into master Oct 17, 2022
@nd0ut nd0ut deleted the feat/request-retry branch October 17, 2022 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants