Skip to content

Commit

Permalink
reduce retry timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Bossett committed Dec 31, 2024
1 parent 871d15b commit 8d1c468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/addn/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const limit = async <T>(fn: () => Promise<T>, retries = 3): Promise<T> => {
if (retries > 0) {
console.log(`retrying limited call:\n${fn.toString()}`)
const delay = (ms: number) => new Promise((res) => setTimeout(res, ms))
await delay(10000)
await delay(3000)
return await limit(fn, retries - 1)
} else {
console.log(`error in limited call:\n${fn.toString()}\n${error}`)
Expand Down

0 comments on commit 8d1c468

Please sign in to comment.