Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Reliable and modern Redis-Streams based task queue for Node.js.
👏 Important: Redis-Streams feature is not available before Redis version 5.
npm install orkid --save
Basic example of producing and consuming tasks:
Producing tasks:
const { Producer } = require('orkid');
// `basic` is the queue name here
// We'll use the same name in the consumer to process this task
const producer = new Producer('basic');
async function addTasks() {
for (let i = 0; i < 10; i++) {
console.log('Adding task ', i);
await producer.addTask(i);
}
}
addTasks()
.then(() => {
console.log('Done');
process.exit(); // To disconnect from redis
})
.catch(e => console.error(e));
Consuming tasks:
const { Consumer } = require('orkid');
// Worker Function
async function workerFn(data, metadata) {
let result;
/*
Do operation on `data` here
and store the result in `result` variable
Anything you return from this function will
be saved in redis and can be viewed in the Orkid UI.
Returning nothing is fine too.
Throwing error will mark the job as failed,
which can be retried too.
*/
console.log('Task done!');
return result;
}
// Consume task from the `basic` queue
const consumer = new Consumer('basic', workerFn);
// Start processing tasks!
// Important: Until you call this method, orkid consumer will do nothing.
consumer.start();
👏 More examples are available in the ./examples directory, including how to do task de-duplication, retry on failure, timeout etc. 👏
API Documentation is available here.
You need to run
orkid-ui
separately for the dashboard. Detail instructions on how to runorkid-ui
locally or in production using docker/docker-compose can be found here: https://github.com/mugli/orkid-ui#running-locally
[TODO: Add a flowchart here]
MIT
FAQs
Reliable and modern Redis-Streams based task queue for Node.js
We found that orkid 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.