@axiljs/queue
v0.2.8
Published
AxilJS message queue, cron scheduler, and retry with backoff
Maintainers
Readme
@axiljs/queue
Message queue with priority and retry, plus cron-based task scheduler.
Part of the AxilJS ecosystem.
Install
npm install @axiljs/queueUsage
import { Queue, Scheduler } from '@axiljs/queue'
const queue = new Queue('emails', { concurrency: 5 })
queue.process('send-welcome', async (job) => sendEmail(job.data.to))
queue.start()
await queue.add('send-welcome', { to: '[email protected]' })
const scheduler = new Scheduler()
scheduler.schedule('daily-report', '0 9 * * *', generateReport)
scheduler.start()Full docs: github.com/SyntaxilitY/AxilJS
