diff --git a/apps/stock/web-api/src/services/monitoring.service.ts b/apps/stock/web-api/src/services/monitoring.service.ts index 4864019..b1f7e4c 100644 --- a/apps/stock/web-api/src/services/monitoring.service.ts +++ b/apps/stock/web-api/src/services/monitoring.service.ts @@ -76,13 +76,13 @@ export class MonitoringService { const stats: QueueStats[] = []; try { - if (!this.container.queue) { + if (!this.container.queueManager) { this.logger.warn('No queue manager available'); return stats; } - // Get all queue names from the SmartQueueManager - const queueManager = this.container.queue as any; + // Get all queue names from the QueueManager + const queueManager = this.container.queueManager as any; this.logger.debug('Queue manager type:', { type: queueManager.constructor.name, hasGetAllQueues: typeof queueManager.getAllQueues === 'function', @@ -92,7 +92,6 @@ export class MonitoringService { // Always use the known queue names since web-api doesn't create worker queues const handlerMapping = { - proxy: 'data-ingestion', qm: 'data-ingestion', ib: 'data-ingestion', ceo: 'data-ingestion', @@ -127,6 +126,8 @@ export class MonitoringService { stats.push({ name: handlerName, + service: serviceName, + queue: handlerName, connected: true, jobs: queueStats, workers: { @@ -141,6 +142,8 @@ export class MonitoringService { this.logger.warn(`Failed to get stats for queue ${handlerName}`, { error }); stats.push({ name: handlerName, + service: serviceName, + queue: handlerName, connected: false, jobs: { waiting: 0, diff --git a/apps/stock/web-api/src/types/monitoring.types.ts b/apps/stock/web-api/src/types/monitoring.types.ts index 6560050..d04edd3 100644 --- a/apps/stock/web-api/src/types/monitoring.types.ts +++ b/apps/stock/web-api/src/types/monitoring.types.ts @@ -23,6 +23,8 @@ export interface CacheStats { export interface QueueStats { name: string; + service: string; + queue: string; connected: boolean; jobs: { waiting: number; diff --git a/apps/stock/web-app/src/features/monitoring/components/QueueStatsTable.tsx b/apps/stock/web-app/src/features/monitoring/components/QueueStatsTable.tsx index ca3b1a8..cae7638 100644 --- a/apps/stock/web-app/src/features/monitoring/components/QueueStatsTable.tsx +++ b/apps/stock/web-app/src/features/monitoring/components/QueueStatsTable.tsx @@ -30,6 +30,7 @@ export function QueueStatsTable({ queues }: QueueStatsTableProps) {
| Service | Queue | Status | Waiting | @@ -46,7 +47,8 @@ export function QueueStatsTable({ queues }: QueueStatsTableProps) {
|---|---|---|---|
| {queue.name} | +{queue.service} | +{queue.queue} |