fixed up workers
This commit is contained in:
parent
60d7de1da8
commit
f41622e530
5 changed files with 30 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue