Skip to content

twnzl/nanium-queue-mongodb

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published