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

nomoque

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nomoque

Database Centric Distributed Task Queue

  • 0.1.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

NoMoQue build status

NoMoQue is a database-centric task queue. It's written in NodeJS and persistent data in MongoDB. It is extremely convenient when you already used these two technologies in your backend stack. You can run task producer/worker any place where you have access to your MongoDB instance.

Usage


var nmq = require('nomoque');
var nmqOptions = {
  dbHost: '127.0.0.1',
  dbPort: 27017,
  dbName: 'db_name',
  collectionPrefix: 'nmq' // Prefix for all collections used by nomoque. The default is no prefix.
};

// create a queue object
var queue = nmq.createQueue(nmqOptions);

// create a payload object, payload could be any javascript plain object which can be stored in mongodb (e.g. string, object, array etc.)
var payload = {
  title: 'any value',
  count: 20
};

// push a payload into a named queue
queue.push('name of queue', payload);

...

// you can process the queue in other part of your code (separate process or server)
// you must give each task a name and for each queue you can attach as many tasks as you wish
queue.process('name of queue', 'task name', function(payload, done) {
  // do something interesting
  ...
  // if everything ok, call done with no argument
  done();
  // or put error object as the first argument if something goes wrong
  done('error, task unfinished');
});

Keywords

FAQs

Package last updated on 29 Jul 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