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

Consider adding a simple mechanism to timeout an entire block #2

Open
akshayp opened this issue Feb 24, 2015 · 1 comment
Open

Consider adding a simple mechanism to timeout an entire block #2

akshayp opened this issue Feb 24, 2015 · 1 comment
Assignees

Comments

@akshayp
Copy link
Contributor

akshayp commented Feb 24, 2015

Right now we don't have specify any timeouts for our actions, so theoretically, the initializePage page action can run forever if even one of the multiple actions takes too long.

Possible method signature:

function executeMultiple(context, actions, done, {
    timeouts: {
       total: {
            time: 200,
            handler: function (err, data) {
               if (err.statusCode === 500) {
                   // a critical action failed
               } else {
                      // timeout with no criticals 
               }
            }
        }
    }
}

The handler should be wrapped to check if any critical tasks failed before being called with a 500 error

@koulmomo koulmomo self-assigned this Feb 24, 2015
@koulmomo
Copy link
Contributor

This would be a nice enhancement, in the meantime, ideally, you should already be setting timeouts on the service calls your individual actions depend on so that your actions in bulk do not run "forever".

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

No branches or pull requests

2 participants