Skip to content

Feature/retry add optional interval#793

Merged
aearly merged 4 commits intocaolan:masterfrom
ahum:feature/retry-add-optional-interval
Jun 17, 2015
Merged

Feature/retry add optional interval#793
aearly merged 4 commits intocaolan:masterfrom
ahum:feature/retry-add-optional-interval

Conversation

@edeustace
Copy link
Copy Markdown
Contributor

I propose adding an optional interval parameter for async.retry, that will introduce a delay between attempts. I have a scenario where I want to retry a call, but not straight away.

This is a non-breaking change.

interval may be passed in as part of an options object as the first parameter to async.retry:

    async.retry({times: 2, interval: 100}, foo, bar);

The existing function signature remains in place:

    async.retry(2, foo, bar); // same as {times: 2, interval: 0}

@aearly aearly added the feature label Jun 17, 2015
aearly added a commit that referenced this pull request Jun 17, 2015
@aearly aearly merged commit bd8325f into caolan:master Jun 17, 2015
@aearly
Copy link
Copy Markdown
Collaborator

aearly commented Jun 17, 2015

Cool, a nice little enhancement. I also prefer this API to your previous PR. Good work! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants