Navigation Menu

Skip to content

izaakschroeder/cutie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Dangerously attractive queues for Redis or MongoDB, SQS and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published