Update ClientServerService.ts

This commit is contained in:
syuilo 2024-09-21 09:23:10 +09:00
parent 72f8f5faf9
commit c1b697f8a5
1 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { createBullBoard } from '@bull-board/api'; import { createBullBoard } from '@bull-board/api';
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter.js'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter.js';
import { FastifyAdapter } from '@bull-board/fastify'; import { FastifyAdapter as BullBoardFastifyAdapter } from '@bull-board/fastify';
import ms from 'ms'; import ms from 'ms';
import sharp from 'sharp'; import sharp from 'sharp';
import pug from 'pug'; import pug from 'pug';
@ -240,7 +240,7 @@ export class ClientServerService {
} }
}); });
const serverAdapter = new FastifyAdapter(); const bullBoardServerAdapter = new BullBoardFastifyAdapter();
createBullBoard({ createBullBoard({
queues: [ queues: [
@ -253,11 +253,11 @@ export class ClientServerService {
this.userWebhookDeliverQueue, this.userWebhookDeliverQueue,
this.systemWebhookDeliverQueue, this.systemWebhookDeliverQueue,
].map(q => new BullMQAdapter(q)), ].map(q => new BullMQAdapter(q)),
serverAdapter, serverAdapter: bullBoardServerAdapter,
}); });
serverAdapter.setBasePath(bullBoardPath); bullBoardServerAdapter.setBasePath(bullBoardPath);
(fastify.register as any)(serverAdapter.registerPlugin(), { prefix: bullBoardPath }); //(fastify.register as any)(bullBoardServerAdapter.registerPlugin(), { prefix: bullBoardPath });
//#endregion //#endregion
fastify.register(fastifyView, { fastify.register(fastifyView, {