
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
beanstalkd-worker
Advanced tools
npm install --save beanstalkd-worker
import BeanstalkdWorker from 'beanstalkd-worker';
const worker = new BeanstalkdWorker(
host, // beanstalkd host
port, // beanstalkd port
);
worker.spawn(tube, {
// job payload/values
}, {
delay: 0,
priority: 1000,
timeout: 10 * 60 * 1000 // ms
}).then(function (job) {
console.log(job.id);
});
worker.handle(tube, function (payload) {
// Complete job
return Promise.resolve();
// Job error
return Promise.reject();
// Spawn a job
this.spawn(someTub);
// Refresh timeout
this.touch();
// Spawn child job and wait for completion before completing this job
await this.child(anotherTube, {/* payload */});
// Await another job
await this.wait(anotherTube, jobId);
// Puts current job back in queue with delay, does not affect retries counter
return this.delay(5000); // ms, default: original timeout
}, {
tries: 3, // Total amount of tries including the first one
backoff: {
initial: 60 * 1000, // ms
exponential: 1.5 // multiple backoff by N each try
}
});
worker.start(); // Enable handlers and start processing jobs, make sure handlers are setup before calling start
Keep in mind that worker will spawn a connection equal to width * amount of tubes. You'll want to make sure that your server is configured to handle that amount of connections (ulimit).
Use DEBUG=beanstalkd-worker*
to enable verbose debugging.
FAQs
High level library for running beanstalkd workers in Node.js
The npm package beanstalkd-worker receives a total of 39 weekly downloads. As such, beanstalkd-worker popularity was classified as not popular.
We found that beanstalkd-worker 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.