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

Support error.timeout_duration for onFailedAttempt. #66

Open
issuefiler opened this issue May 29, 2022 · 2 comments
Open

Support error.timeout_duration for onFailedAttempt. #66

issuefiler opened this issue May 29, 2022 · 2 comments

Comments

@issuefiler
Copy link

“Trying again in 32 seconds.”

I propose p-retry provide error.timeout_duration, that is, in how much time the next retry begins, for onFailedAttempt.

This can be achieved by reading this._timeouts.

@issuefiler
Copy link
Author

Or error.time_off. I don’t mind the property name.

@MCArth
Copy link

MCArth commented Feb 9, 2024

p-retry uses https://github.com/tim-kos/node-retry and passes all options through

so e.g. you can pass through

				factor: 1.5,
				minTimeout: 500,

as options to p-retry which will result in an initial gap of 500ms between retries with a 1.5x exponential increase factor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants