
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@opens/bullmq
Advanced tools
BullMQWrapper is a wrapper around BullMQ that simplifies creating and managing task queues using Redis. It provides an easy interface for queue creation, worker registration, and task publishing.
On top of installing this package, the following variables must be defined in your environment or an exception will be thrown
BULLMQ_REDIS_HOST BULLMQ_REDIS_PORT
To create a queue, you can use createTask
. You can specify the queue name, job options, and an optional worker to process jobs.
import { bullmq } from '@opens/bullmq';
bullmq.createTask({
taskName: 'example-task',
concurrency: 5,
up: async (data, job) => {
console.log('Processing job:', job.id);
},
});
Once the queue is created, you can add tasks to it using publishTask
.
await bullmq.publishTask({
taskName: 'example-task',
taskData: { key: 'value' },
taskOptions: { delay: 1000 },
});
Workers process jobs in the queue. You can create a worker separately using createWorker
.
bullmq.createWorker({
taskName: 'example-task',
concurrency: 3,
up: async (data, job) => {
console.log('Job executed:', job.data);
},
down: async (data, job, error) => {
console.log('Job failed::', job.id);
console.error("With error::", error)
},
});
To check the number of active queues, use getTaskCount
.
console.log('Number of task queues:', bullmq.getTaskCount());
publishTask
returns null
.down
function to handle failures.This project is licensed under the MIT License.
FAQs
A wrapper around bullmq
The npm package @opens/bullmq receives a total of 8 weekly downloads. As such, @opens/bullmq popularity was classified as not popular.
We found that @opens/bullmq demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.