nanium-queue-mongodb
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

nanium-queue-mongodb

A nanium request queue using a mongodb collection to manage the request entries.

Install

npm install nanium-queue-mongodb

Usage

Usage

import { Nanium } from 'nanium/core';
import { NaniumMongoQueue } from 'nanium-queue-mongodb';
import * as express from 'express';

mongoQueue = new NaniumMongoQueue({
	checkInterval: 10,
	serverUrl: 'mongodb://localhost:27017',
	databaseName: 'test',
	collectionName: 'requestQueue',
});
await Nanium.addQueue(mongoQueue);

Connects to the mongodb server specified through the serverUrl. Creates a collection with the name specivied by collectionName in the database databaseName. Every checkInterval seconds it checks vor new request entries or changed states. It executes requests that are ready and writes the result back to the entry in the collection.

Readme

Keywords

Package Sidebar

Install

npm i nanium-queue-mongodb

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

11.3 kB

Total Files

4

Last publish

Collaborators

  • twnzl