Skip to content

Commit

Permalink
fix: increasing timeout for retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Jul 21, 2021
1 parent 853ebc1 commit 29c536a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,15 @@ export async function deletePullSecret(teamId: string, name: string): Promise<vo
}
}

const retryOptions: Options = {
retries: 2,
factor: 2,
// minTimeout: The number of milliseconds before starting the first retry. Default is 1000.
minTimeout: 3000,
// The maximum number of milliseconds between two retries.
maxTimeout: 10000,
}

export async function faultTolerantFetch(url: string): Promise<void> {
const retryOptions: Options = {
retries: 10,
factor: 2,
// minTimeout: The number of milliseconds before starting the first retry. Default is 1000.
minTimeout: 1000,
// The maximum number of milliseconds between two retries.
maxTimeout: 30000,
}
try {
await retry(async (bail) => {
try {
Expand Down

0 comments on commit 29c536a

Please sign in to comment.