cutie

2.0.0 • Public • Published

cutie

Unopinionated, streaming task queue.

build status coverage license version downloads

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(job, enc, done) {
    // 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:

Readme

Keywords

Package Sidebar

Install

npm i cutie

Weekly Downloads

4

Version

2.0.0

License

CC0-1.0

Last publish

Collaborators

  • izaakschroeder