Skip to content

Feature: set a timeout for the entire retry operation #73

Description

@fastfrwrd

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").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions