Created
December 28, 2012 17:04
-
-
Save evantahler/4399793 to your computer and use it in GitHub Desktop.
A way to checkout the status of your task queue in actionHero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var action = {}; | |
///////////////////////////////////////////////////////////////////// | |
// metadata | |
action.name = "inspectTasks"; | |
action.description = "I show you what it going on"; | |
action.inputs = { | |
"required" : [], | |
"optional" : [] | |
}; | |
action.outputExample = {} | |
///////////////////////////////////////////////////////////////////// | |
// functional | |
action.run = function(api, connection, next){ | |
api.utils.checkAuth(api, connection, next, function(err, dbUser){ | |
api.tasks.inspectTasks(api, function(err, tasks){ | |
if(err != null){ connection.error = err }{ | |
connection.response.tasks = tasks; | |
next(connection, true); | |
} | |
}); | |
}); | |
}; | |
///////////////////////////////////////////////////////////////////// | |
// exports | |
exports.action = action; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment