node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



creates jobs and puts it on a reliable redis queue for workers


Basic Usage

npm install redis-jobs

var redisjobs = require('redis-jobs');
var queue = new redisjobs.Queue();
var job = queue.createJob({foo: 'bar'});
job.on('timeout', function(){
  console.log('request timed out on message bus');
job.on('reply', function(res){
//On worker drone 
var worker = new redisjobs.Worker();
worker.on('job', function(job){
  var res = + 'baz';

Jobs are put onto a Redis List and popped off the list using BRPOPLPUSH; When a worker uses reply the message is deleted from the temporary work queue and sent over a publish message to the job requester. This allows jobs to queue up but the responses will be streamed back immediatly. Later releases will include a queue monitor interface to handle automatic load scaling.