minion-job

0.0.2 • Public • Published

MinionJob

Multi-process, multi-queue background processing in both node and browser.

Install

npm install minion-job --save

Usage

In browser

var job = new MinionJob.Job(
  function(dataset){
    do_some_intense_work(dataset)
  },
  'urgent_queue'
)

job.perform_later(dataset)

In Node.js

Well, it's almost exactly the same code as in browser.

var MinionJob = require('minion-job')

var job = new MinionJob.Job(
  function(dataset){
    do_some_intense_work(dataset)
  },
  'urgent_queue'
)

job.perform_later(dataset)

Inside

Using Web Worker in browser and node-webworker-threads in node as multi-process implantation.

Using Loki.js for in-memory data storage in both browser and node.

More

Please feel free to create issues for bugs, feature requests and other discussions.

Dependencies (2)

Dev Dependencies (4)

Package Sidebar

Install

npm i minion-job

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • nanowang