Skip to content

Instantly share code, notes, and snippets.

@techwraith
Created July 7, 2011 20:15
Show Gist options
  • Save techwraith/1070442 to your computer and use it in GitHub Desktop.
Save techwraith/1070442 to your computer and use it in GitHub Desktop.
Testing Kue
var kue = require('kue');
var jobs = kue.createQueue();
var i = 1;
var jobInterval = setInterval(function(){
console.log("creating job " + i + ".")
jobs.create('test', {title:"This is a test", thing:"another thing.", id: i});
i++;
},2000);
setTimeout(function(){
clearInterval(jobInterval);
},60000);
jobs.process('test', function(job, done){
console.log(job);
done();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment