I find myself doing this a lot when using async-retry:
await Promise.race(
retry(/* ... */),
new Promise((_, reject) => {
setTimeout(() => {
reject(new Error('FAILED to complete async retry in less than 1 minute'))
}, 60000)
}),
)
It would be awesome if there were a clean way to provide an option (retryTimeout?) that allowed you to say ("time out after the retry went for this long, regardless of the attempt number").
I find myself doing this a lot when using async-retry:
It would be awesome if there were a clean way to provide an option (
retryTimeout
?) that allowed you to say ("time out after the retry went for this long, regardless of the attempt number").