Skip to content

Commit

Permalink
AT-9828: update retry strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
rddimon committed Jul 18, 2023
1 parent 644ff83 commit 9877e31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export default class Globals {
return await fromIni({profile})();
}

public static getRetryStrategy(attempts: number = 3, delay: number = 10000) {
public static getRetryStrategy(attempts: number = 3, delay: number = 3000, backoff: number = 500) {
return new ConfiguredRetryStrategy(
attempts, // max attempts.
// This example sets the backoff at 100ms plus 10s per attempt.
// This example sets the backoff at 500ms plus 3s per attempt.
// https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/modules/_aws_sdk_util_retry.html#aws-sdkutil-retry
(attempt: number) => 100 + attempt * delay // backoff function.
(attempt: number) => backoff + attempt * delay // backoff function.
)
}
}

0 comments on commit 9877e31

Please sign in to comment.