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

jobmanager

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jobmanager

Simple async job manager. Allows you to execute serial or parallel jobs.

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A really simple tool that helps you manage multiple asynchronous tasks.

Install

npm install jobmanager

Usage

See: https://github.com/demian85/node-jobmanager/blob/master/examples.js

var JobManager = require('jobmanager').JobManager;
var options = {}; // see below
new JobManager(options).init();

Options

  • (Array) input: array of items to process.
  • (Number) retries: maximum number of retries before fail.
  • (Number) max: max number of jobs to run in parallel. Default = 0 (no limit)
  • (Function) exec: Function to be called for each input item. The first argument will be the item extracted from the queue. The 2nd is an object representing the current job and has the following methods: retry(), next(), fail(). 'this' refers to the job manager instance.
  • (Function) end: Function to be called after the execution of all tasks. Also emited as 'end' event.
  • (Function) fail: Function to be called when a job failed all the retry attempts or when fail() method is called explicitly.

Keywords

FAQs

Package last updated on 21 Sep 2011

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