0.0.1 • Published 6 months ago

adonisjs-queuedash v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Getting Started

This package is available in the npm registry.

npm install adonisjs-queuedash

Next, configure the package by running the following command.

node ace configure adonisjs-queuedash

Usage

basic usage

// start/routes.ts

import { Queue } from 'bullmq';

Route.queuedash('/queues', {
	queues: [
		{
			queue: new Queue('report-queue'),
			displayName: 'Reports',
			type: 'bullmq' as const, // bullmq, bull, bee
		},
	],
});

using @rlanz/bull-queue

// start/routes.ts

import { Queue as BullmqQueue } from 'bullmq';
import { queueNames, config } from 'Config/queue';

const queues = queueNames.map((queueName) => ({
	queue: new BullmqQueue(queueName, {
		connection: config.connection,
	}),
	displayName: queueName,
	type: 'bullmq' as const,
}));

Route.queuedash('/queues', {
	queues,
});