New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pika-queue

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pika-queue

PikaQueue provides a simple abstraction to managing job queues in redis.

  • 0.0.9
  • Source
  • npm
  • Socket score

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

PikaQueue

PikaQueue provides a simple abstraction to managing job queues in redis.

There are two players involved in a job queue: a producer and a worker.

A producer is an entity that submits a job to a queue to be completed. The producer may or may not be interested in being notified of the completion and status of job submitted.

A worker in an entity that monitors a job queue, processes the job, and then sends a notification to any interested parties once the completed.

Example of a producer:

var queueName = 'work-queue';
var producer = new PikaQueue();

// Pass in a callback if you wish to receive notification when the job is complete.
producer.queueJob(queueName, {data: "Job Data"}, function(err, notification) {
  // Do something with the notification
});

// If you do not wish to receive notification when the job is complete, simply omit the callback
producer.queueJob(queueName, {data: "Job Data"});

Example of a worker:

var queueName = 'work-queue';
var worker = new PikaQueue();

worker.monitorJobQueue(queueName, function(job, notificationFunc) {
  // Do some work...
  var err = null;
  notificationFunc(err, {yourStatusMessage: "operation successful"});
});

FAQs

Package last updated on 15 Oct 2012

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