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

delayed-job

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delayed-job

Redis backed Node.js implementation of delayed job

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

delayed-job

delayed-job is a horizontally scalable implementation of Ruby's delayed_job. Using semaphore locks it aims to provide an atomic interface to a federation of workers operating on the same job queue. Initial work has focussed on a Redis backed database, however more backend implementations are possible.

Installation

npm install delayed-job

Usage

var Scheduler = require('delayed-job');

var scheduler = Scheduler.createSchedule({
  backend: {
    name: 'redis',
    jobHoldingBay: 'myUniqueListKey'
  }
});

scheduler.on('job',function(job) {
  console.log('Received job',job);
});

var myJob = {
  title: 'Great Gig In The Sky'
};

scheduler.delay(myJob,2000);

API

schedular.delay(job,timeout)

Schedule a job for execution

Assumptions

  • errors thrown will result in re-establishing the scheduler [expand]
  • Single atomic source of truth
  • Db interactions are also atomic
  • Jobs emitted have no immediate relationship to one another

Keywords

FAQs

Package last updated on 19 May 2013

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