2.1.2 • Published 8 years ago
worq v2.1.2
worq
Promising job queue
Run promises in series or with a configurable concurrency limit
Install
$ npm install --save worq
Usage
const Queue = require('worq');
let queue = new Queue();
queue.run([
() => somePromisingFunction(),
() => someOtherPromisingFunction(),
() => someNormalFunction()
// these functions will be executed in series
]).then(results => {
// results will be an array containing the return / fulfillment values
});
API
Queue(options)
options
concurrency
Type: number
Default: 1
The maximum number of jobs that can run simultaneously
Queue.run(jobs)
jobs
Type: Function[]
An array of jobs. Jobs may return/throw regularly or return a promise.
Returns a promise for an array containing the fulfillment values in the same order.
Queue.cancel()
Cancels the remaining jobs.
License
MIT © JM Versteeg
2.1.2
8 years ago
2.1.1
8 years ago
2.1.0
8 years ago
2.0.3
8 years ago
2.0.2
8 years ago
2.0.1
8 years ago
2.0.0
8 years ago
1.2.1
8 years ago
1.2.0
9 years ago
1.1.0
9 years ago
1.0.0
9 years ago
0.2.3
9 years ago
0.2.2
9 years ago
0.2.1
9 years ago
0.2.0
9 years ago
0.1.0
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago