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: Add randomize option #77

Closed
wants to merge 2 commits into from

Conversation

changchanghwang
Copy link

});
```
*/
readonly randomize?: boolean;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option is coming from the retry package, so this needs to be added to @types/retry.

/**
Decide if a random delay should be introduced between retries.
Enabling this option adds variability to the retry strategy, helping to distribute load peaks and reduce contention.
If set to `true`, a random delay will be introduced between each retry attempt.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needs to say what the random delay range could be.

const result = await pRetry(run, {
randomize: true
});
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already covered by:

Options are passed to the retry module.

@changchanghwang
Copy link
Author

changchanghwang commented Apr 1, 2024

@sindresorhus
sorry for wasting your time :(
I didn't see & OperationOptions.. this pull request isn't necessary anymore.

Thank you for review!

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

Successfully merging this pull request may close these issues.

2 participants