Skip to content

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

Open
@akshayp

Description

@akshayp

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions