cutie

Unopinionated, streaming task queue.

cutie

Unopinionated, streaming task queue.

Cutie is a streaming task queue with a similar design philosophy to gulp. Queues are streams that emit jobs to workers, and then when workers complete the job they emit the job themselves.

Because of this, cutie presently has no code and simply defines an API specification that other queues and workers adhere to. To conform to a specific version list "cutie": "^version" in your peerDependencies.

Sending jobs is as easy as:

var job = { foo: 'bar' };
// Write job to the queue stream 
queue.write(job);

Processing jobs is as easy as:

var worker = through2.obj(function(jobencdone) {
    // do work 
    ...
    // report the job as finished 
    done(null, job);
});
queue.pipe(worker);

You can control worker parallelism by specifying its highWaterMark:

// Run only 1 job at a time with this 
var worker = through2({ objectMode: true, highWaterMark 1 }, ...);

Available queues: