2022-06-26 15:01:55 +00:00
|
|
|
import { ExpressAdapter } from "@bull-board/express";
|
|
|
|
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
|
|
|
|
import { createBullBoard } from "@bull-board/api";
|
|
|
|
|
|
|
|
import queues from "~/queues";
|
|
|
|
|
|
|
|
export function setupBullBoard() {
|
|
|
|
const serverAdapter = new ExpressAdapter();
|
|
|
|
createBullBoard({
|
2023-04-29 16:30:07 +00:00
|
|
|
queues: queues.map((queue) => new BullMQAdapter(queue)),
|
2022-06-26 15:01:55 +00:00
|
|
|
serverAdapter,
|
|
|
|
});
|
|
|
|
serverAdapter.setBasePath("/admin/queues");
|
|
|
|
return serverAdapter;
|
|
|
|
}
|