
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
sails-hook-bull
Advanced tools
Sails.js hook to use bull package for handling distributed jobs and messages.
Install it via npm:
npm install sails-hook-bull --save
or
yarn add sails-hook-bull
Requirement: Redis version greater than or equal to 2.8.18 is required.
You can set some parameters in config/bull.js
to overrides defaults options for all queues.
module.exports.bull = {
redis: {
port: 6379,
host: '127.0.0.1',
db: 0,
password: ''
}
}
See bull.queue for more information.
Bull queue definition in api/queues/firstQueue.js
module.exports = {
queueName: 'first-queue',
// if redis already defined as an object, url will be ignored
url: 'redis://127.0.0.1:6379',
opts: {
limiter: {
max: 1000,
duration: 5000
}
},
process: async job => {
return doSomething(job.data);
}
};
You can define queues with options:
module.exports = {
queueName: 'my-queue',
process: {
name: 'my-process',
concurrency: 1,
processor: (job, done) => {
// do something...
done();
}
}
};
Adding jobs to a queue:
// api/controllers/someController.js
module.exports = {
someAction: function(req, res) {
sails.hooks.bull.firstQueue.add({
foo: 'bar'
})
}
};
MIT
FAQs
A bull wrapper for sails
The npm package sails-hook-bull receives a total of 32 weekly downloads. As such, sails-hook-bull popularity was classified as not popular.
We found that sails-hook-bull 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.