Last active
December 29, 2015 07:39
-
-
Save ktkaushik/7637811 to your computer and use it in GitHub Desktop.
Kue
This file contains hidden or 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 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