middleware/mw.tasks.js
function init(ctx) {
        _.each(resources, function (resource) {
            _.each(resource.tasks, function (taskInfo, taskName) {
                taskInfo.name = taskName;
                taskInfo.service = pancakes.getService(resource.name);
                taskHandlers[taskName] = taskInfo;
            });
        });

        return new Q(ctx);
    }
function init(ctx) {
        _.each(resources, function (resource) {
            _.each(resource.tasks, function (taskInfo, taskName) {
                taskInfo.name = taskName;
                taskInfo.service = pancakes.getService(resource.name);
                taskHandlers[taskName] = taskInfo;
            });
        });

        return new Q(ctx);
    }
function init ( ctx ) { _ . each ( resources , function ( resource ) { _ . each ( resource . tasks , function ( taskInfo , taskName ) { taskInfo . name = taskName ; taskInfo . service = pancakes . getService ( resource . name ) ; taskHandlers [ taskName ] = taskInfo ; } ) ; } ) ; return new Q ( ctx ) ; }
Initialize a local variable that holds the config values for the task
handlers
@param ctx
Initialize a local variable that holds the config values for the task handlers