qp
Efficient queue manager/processor in node.js.
Has a server/admin interface, available at qp-server.
Install
$ npm install --save qp
Basic Usage
var QP = ; var qp = ; var q = qp; var job = q; // if you want to save a redis round trip, assign the job an ID.jobid = Math; // save the job for processingjob; var jobs = qp: 'does it really work?' any: 'data' cango: 'here' ; q; // process jobs, concurrency of 3q; // or just default to one at a timeq; // stop processing cleanlyq;
Options
// QPvar qp = cleanShutdown: true // default: false. set to true to have all workers complete all jobs prior to process exit { process } // default: process.exit. set to you own function to handle exits cleanly shutdownTimeout: 1000 // default: no timeout. force call of shutdownCB after this number of milliseconds if we haven't cleanly exited already; // any of these options can be specified above as options to new QP. Any options here will override those specified for QP.var q = qp; // processingq;