feat: Implement auto-run interval for triggers of completed flows
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
3715291df7
commit
22e1fe5c44
15
packages/backend/src/helpers/create-bull-board-handler.ts
Normal file
15
packages/backend/src/helpers/create-bull-board-handler.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ExpressAdapter } from '@bull-board/express';
|
||||
import { createBullBoard } from '@bull-board/api';
|
||||
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
|
||||
import processorQueue from '../queues/processor';
|
||||
|
||||
const serverAdapter = new ExpressAdapter();
|
||||
|
||||
const createBullBoardHandler = async (serverAdapter: ExpressAdapter) => {
|
||||
createBullBoard({
|
||||
queues: [new BullMQAdapter(processorQueue)],
|
||||
serverAdapter: serverAdapter,
|
||||
});
|
||||
};
|
||||
|
||||
export { createBullBoardHandler, serverAdapter };
|
13
packages/backend/src/helpers/inject-bull-board-handler.ts
Normal file
13
packages/backend/src/helpers/inject-bull-board-handler.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Application } from 'express';
|
||||
import { ExpressAdapter } from '@bull-board/express';
|
||||
|
||||
const injectBullBoardHandler = async (
|
||||
app: Application,
|
||||
serverAdapter: ExpressAdapter
|
||||
) => {
|
||||
const queueDashboardBasePath = '/admin/queues';
|
||||
serverAdapter.setBasePath(queueDashboardBasePath);
|
||||
app.use(queueDashboardBasePath, serverAdapter.getRouter());
|
||||
};
|
||||
|
||||
export default injectBullBoardHandler;
|
Reference in New Issue
Block a user