@optimiser/service-queue
v1.0.1
Published
> TODO: description
Downloads
8
Readme
@optimiser/service-queue
Common service queue processor for microoptimiser and its services. Adds new jobs to service queue.
Features
- Offline backend processing of job queues .
- Queues are generally based on companyId with the prefix of backendProcessing.
Installation
npm install @optimiser/service-queue
Usage
First, require the serviceQueue
function from the library:
const serviceQueue = require('@optimiser/service-queue');
Adding jobs in queue
const event = 'EventName';
const meta = {
userID, companyID
};
let { errorAddServiceQueue, resultAddServiceQueue } = await serviceQueue(event, meta, payload);
if(resultAddServiceQueue.status == 'status'){
// further processing of queue
}
Running Tests
npm test
Author
Optimiser
License
ISC