Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jobq

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jobq

Async and parallel execution of jobs, tasks and processes with a queue manager

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-36.36%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

jobQ

Async and parallel execution of jobs, tasks and processes

Installation

npm install --save jobQ

Usage

var jobQ = require('jobQ') 

var queue = new JobQueuer({
  process: function(x, callback){
    setTimeout(function() {
      callback(null, x)
    }, 3000)
  },
  source: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  maxProceses: 2
})

queue.start()

Events

var queue = new JobQueuer({
  process: myProcess,
  source: mySource,
  maxProceses: 2
})

queue.on('start', function(){})
queue.on('jobFetch', function(){})
queue.on('jobRun', function(){})
queue.on('jobFinish', function(){})
queue.on('processFinish', function(){})
queue.on('error', function(){})

queue.start()

Source

The following source types are accepted:

  • Array
  • Array of Promises
  • Promise
  • Function that returns a Promise
  • Function that Return a Value
  • Function with Callback

Process

The following process types are accepted:

  • Function that returns a value
  • Function that returns a Promise
  • Function that executes a Callback

Keywords

FAQs

Package last updated on 17 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc