Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

💨 Add partial jitter #14

Merged
merged 1 commit into from
May 21, 2019
Merged

💨 Add partial jitter #14

merged 1 commit into from
May 21, 2019

Conversation

ronjouch
Copy link
Contributor

Sometimes you want jitter but only a bit of it: closer to the
non-jittered value than you'd have got with full jitter.

Backwards compatible with current "full jitter" mode.

Also, regenerate package lock.

Sometimes you want jitter but only a bit of it: closer to the
non-jittered value than you'd have got with full jitter.

Backwards compatible with current "full jitter" mode.

Also, regenerate package lock.
@ronjouch ronjouch requested review from louib and erykwarren May 21, 2019 19:54
@@ -81,7 +90,7 @@ export async function retry(
options: BackoffOptions,
targetFunction: any,
thisArg: any = null,
...args: any[],
...args: any[] // tslint:disable-line
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tsc's A rest parameter or binding pattern may not have a trailing comma.ts(1013) was fighting with tslint's trailing-comma rule

@@ -81,7 +90,7 @@ export async function retry(
options: BackoffOptions,
targetFunction: any,
thisArg: any = null,
...args: any[],
...args: any[] // tslint:disable-line
Copy link
Contributor

Choose a reason for hiding this comment

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

Look like a bug in tslint: palantir/tslint#4172
According to that issue, another workaround is to add esSpecCompliant: true to the trailing-comma rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Look like a bug in tslint: palantir/tslint#4172
According to that issue, another workaround is to add esSpecCompliant: true to the trailing-comma rule.

@erykwarren hmmm I can't get the option to work, it keeps complaining (and it's supposed to be true by default). Not going to dig more, leaving the disable-line, anyway tslint is getting replaced by eslint.

@ronjouch ronjouch merged commit 8750a36 into master May 21, 2019
@ronjouch ronjouch deleted the feature/partial-jitter branch May 21, 2019 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants