Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added retryable wrapper for async tasks #1058

Merged
merged 5 commits into from Mar 18, 2016
Merged

added retryable wrapper for async tasks #1058

merged 5 commits into from Mar 18, 2016

Conversation

aearly
Copy link
Collaborator

@aearly aearly commented Mar 12, 2016

This splits out the old "control flow" behavior from retry. It wraps a task, rather than immediate running it.

@megawac would love your code review, as well as perhaps an idea for a better name?

return rest(function (args) {
var callback = args.pop();
retry(opts, function (cb) {
task(...args.concat([cb]));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove splat?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@aearly
Copy link
Collaborator Author

aearly commented Mar 12, 2016

What do you think about the retryable name?

aearly added a commit that referenced this pull request Mar 18, 2016
added retryable wrapper for async tasks
@aearly aearly merged commit bdf4a96 into master Mar 18, 2016
@aearly aearly added this to the 2.0 milestone Mar 24, 2016
@megawac megawac deleted the retryable branch April 12, 2016 22:56
@megawac megawac restored the retryable branch April 12, 2016 22:56
@megawac megawac deleted the retryable branch April 12, 2016 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants