UNPKG

@xtcry/bull-arena

Version:

An interactive UI dashboard for Bee/Bull Queue

24 lines (23 loc) 759 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const QueueHelpers = require("../../helpers/queueHelpers"); async function handler(req, res) { const { connectionName, flowHost } = req.params; const { Flows } = req.app.locals; const flow = await Flows.get(connectionName, flowHost); const basePath = req.baseUrl; if (!flow) return res.status(404).render('dashboard/flowNotFound', { basePath, connectionName, flowHost, }); const stats = await QueueHelpers.getStats(flow); return res.render('dashboard/flowDetails', { basePath, connectionName, flowHost, stats, }); } exports.default = handler;