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

rpq

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rpq

redis persistent queue

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

rpq

rpq is a redis-backed queue. Nope, not a message queue, just a persistent queue to shove objects into in case you need something more resilient than memory.

It provides some simple queue apis (e.g. pop(), push()).

Install

npm install rpq

Usage

pop(callback) - pop an item from the queue

push(item, callback) - push an item on the queue

size(callback) - get size


var Queue = require('rpq');

var queue = new Queue({ 
    key: 'my-queue-name',       // name of queue
    // server: '127.0.0.1',     // (optional) redis server
    // port: 6379               // (optiona) redis port 
});

var item = { hello: 'world', abc: 123 };

queue.push(item, function(err) {
    queue.size(function(err, size) {
      console.log("size is:", size);
      queue.pop(function(err, item) {
        console.log("popped:", item);
      });
    });
});

output:

size is: 1
popped: { hello: 'world', abc: 123 }

License

MIT

Keywords

FAQs

Package last updated on 12 Aug 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