Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
monq
Advanced tools
Readme
Monq is a MongoDB-backed job queue for Node.js.
Connect to MongoDB by specifying a URI or providing host
, port
and database
options:
var monq = require('monq');
var client = monq('mongodb://localhost:27017/monq_example');
Enqueue jobs by supplying a job name and a set of parameters. Below, the job reverse
is being placed into the example
queue:
var queue = client.queue('example');
queue.enqueue('reverse', { text: 'foobar' }, function (err, job) {
console.log('enqueued:', job.data);
});
Create workers to process the jobs from one or more queues. The functions responsible for performing a job must be registered with each worker:
var worker = client.worker(['example']);
worker.register({
reverse: function (params, callback) {
try {
var reversed = params.text.split('').reverse().join('');
callback(null, reversed);
} catch (err) {
callback(err);
}
}
});
worker.start();
Workers will emit various events while processing jobs:
worker.on('dequeued', function (data) { … });
worker.on('failed', function (data) { … });
worker.on('complete', function (data) { … });
worker.on('error', function (err) { … });
npm install monq
npm test
You can optionally specify the MongoDB URI to be used for tests:
MONGODB_URI=mongodb://localhost:27017/monq_tests npm test
npm run jsdoc2md
FAQs
MongoDB-backed job queue for Node.js
The npm package monq receives a total of 382 weekly downloads. As such, monq popularity was classified as not popular.
We found that monq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.