Socket
Socket
Sign inDemoInstall

couch-queue

Package Overview
Dependencies
55
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couch-queue

Safe, concurrent queuing allowing multiple writers and multiple workers using CouchDB as its backend


Version published
Maintainers
1
Install size
4.36 MB
Created

Readme

Source

couch-queue

Safe, concurrent queuing allowing multiple writers and multiple workers using CouchDB as its backend.

The principal difference from other, similar modules is that this will wait for another entry to become available, if the queue is exhausted.

Example


static Queue = require('couch-queue');

static queue = new Queue(undefined, undefined, {
  username: 'cliff',
  password: 'pass'
});
queue.on('ready', function() {
  queue.createQueue();
})
.on('dequeued', function(data) {
  console.log("Dequeued payload " + JSON.stringify(data, null, 2));
});
.on('created', function() {
  var payload = {
    anything: "you like",
    canGo: "in here"
  }
  queue.enqueue(payload);
})




## Database Fields
* pending: boolean
* enqueued: time pushed
* dequeued: time pulled

## Installation

    npm install couch-queue

## Events

    ready

Emitted by the contructor

Keywords

FAQs

Last updated on 18 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc