Skip to content

Instantly share code, notes, and snippets.

@ktkaushik
Last active December 29, 2015 07:39
Show Gist options
  • Select an option

  • Save ktkaushik/7637811 to your computer and use it in GitHub Desktop.

Select an option

Save ktkaushik/7637811 to your computer and use it in GitHub Desktop.
Kue
var kue = require('kue')
, q = new kue;
// list all the active job ids
q.active(function(err, ids) {
console.log(ids);
});
// remove all the active jobs
q.active(function(err, ids) {
console.log(ids);
for(i=0; i < ids.length; i ++) {
kue.Job.get(ids[i], function(err, job) {
job.remove();
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment