worker-queue

0.1.1 • Public • Published

worker-queue

version build license

Small sample queuing system implementation.

Install

$ npm install worker-queue

Usage

const queue = require('worker-queue')
 
const worker = (data, done) => {
  // handle data
  done(null, data)
}
 
const notifier = () => console.log('all jobs completed')
const options = { concurrency: 1, notifier }
 
const client = queue(worker, options)
 
client.push({ test: true }, (err, result) => {
  // do something
})

License

MIT

/worker-queue/

    Package Sidebar

    Install

    npm i worker-queue

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • harlanj