
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
vf-tasks-queue
Advanced tools
This module is an abstraction of RabbitMQ.
It supports both promises and callbacks.
npm install --save vf-tasks-queue
Returns a task queue, ready to send and process tasks.
Parameters
Stores a new task in the queue.
Parameters
Takes tasks and process them.
Parameters
1.data. You sould return a promise, otherwise task won't be marked as resolved and will be processed again.Removes all unprocessed tasks of a type.
Parameters
Closes the connection with database.
config.js
module.exports = {
prefix: 'queue',
rabbitmq: {
host: 'localhost'
}
};
tasks_sender.js
const config = require('config.js');
const tasksQueueConnector = require('vf-tasks-queue');
const taskType = 'test-task';
const taskData = {
name: 'Chewbacca'
};
tasksQueueConnector.connect(config)
.then(tasksQueue => {
tasksQueue.send(taskType, taskData)
});
tasks_processor.js
const config = require('config.js');
const tasksQueueConnector = require('vf-tasks-queue');
const taskType = 'test-task';
const processor = (data, callback) => {
console.log(data.name); // Prints "Chewbacca"
return Promise.resolve();
}
const options = {
type: taskType,
concurrency: 1
};
tasksQueueConnector.connect(config)
.then(tasksQueue => {
tasksQueue.process(options, processor);
});
npm test
MIT
FAQs
Tasks queue module
The npm package vf-tasks-queue receives a total of 1 weekly downloads. As such, vf-tasks-queue popularity was classified as not popular.
We found that vf-tasks-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.