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.
agenda-batch
Advanced tools
Readme
A batching tool for the agenda.js tool that will proxy data to a task that has not been run.
Initialize the library:
var Agenda = require('agenda');
var Batch = require('batch');
var agenda = new Agenda({ db: { address: 'db-connection:24717' } });
batch = new Batch( agenda );
Define jobs using the agenda module:
agenda.define('email-some-users', function(err, cb) {
// Do Something
});
Batch a process by calling the batch function.
batch.batch('batch-key', { data }, 'in 40 minutes', 'email-some-users');
Subsequent calls to the batch function will add data to the original waiting job. Important note. The timing of existing jobs will not be reset. The purpose of the function is to be able to send additional data to jobs in the queue without having to care when they will fire.
batch.batch('batch-key', { MORE-data }, 'in 40 minutes', 'job-name');
In the callback, the data will be found in the attrs.data.jobData
attribute.
batch.define('job-name', function(job) {
job.attrs.data.jobData // Will be an array of the data that was 'batched'.
job.attrs.data.key // The key used to store this batch for this job.
});
Once the job is complete, the key will be abandoned and the job removed for the next job to use (on subsequent calls to batch()
);
Take a look at lib/cli, or run it via npm run cli
to see an example. Requires a mongo instance for agenda to run.
FAQs
A batch process for the agenda module
The npm package agenda-batch receives a total of 7 weekly downloads. As such, agenda-batch popularity was classified as not popular.
We found that agenda-batch 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.