
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@itcutives/queue-helper
Advanced tools
Easy swappable abstract interface for BeeQueue and Bull.
npm i @itcutives/queue-helper
const Bull = require('@itcutives/queue-helper/src/Bull');
Note: Does not support enqueueAt
function
bull.enqueue(data);
const BeeQueue = require('@itcutives/queue-helper/src/BeeQueue');
BeeQueue.enqueue(data);
BeeQueue.enqueueAt(data, timestamp);
const BeeQueue = require('@itcutives/queue-helper/src/BeeQueue');
class SendMessage extends BeeQueue {
static get NAME() {
return 'SendMessage';
}
// processing function
static Process(job) {
return new Promise((resolve) => {
const seconds = 10;
const timeout = seconds * 1000;
setTimeout(() => {
resolve(JSON.stringify({ [SendMessage.NAME]: job.data }));
}, timeout);
});
}
}
module.exports = SendMessage;
isWorker
: flag to distinguish between worker
and scheduler
processesconst SendMessage = require('./tasks/SendMessage');
const config = {
redis: {
port: '6379',
host: '192.168.1.1',
db: '0',
password: '',
},
isWorker: false,
};
const sendMessage = new SendMessage(config);
(async () => {
// adding to queue
await sendMessage.enqueue({ messageId: 1 });
// scheduling
const dt = new Date();
dt.setSeconds(dt.getSeconds() + 40);
await sendMessage.enqueueAt({ messageId: 2 }, dt);
await sendMessage.close();
})();
removeOnSuccess
: Enable to have this worker automatically remove its successfully completed jobs from Redis, so as to keep memory usage down.activateDelayedJobs
: Activate delayed jobs once they've passed their delayUntil timestamp.concurrency
: sets the maximum number of simultaneously active jobs for this processor. It defaults to 1.const SendMessage = require('./tasks/SendMessage');
const config = {
redis: {
port: '6379',
host: '192.168.1.254',
db: '0',
password: '',
},
removeOnSuccess: true,
activateDelayedJobs: true,
concurrency: 10,
};
const sendMessage = new SendMessage(config);
FAQs
ITcutives Queue helper (Bull, BeeQueue)
The npm package @itcutives/queue-helper receives a total of 0 weekly downloads. As such, @itcutives/queue-helper popularity was classified as not popular.
We found that @itcutives/queue-helper 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.