mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: Update getQueueSize method to return combined queue sizes for worker and workflow
This commit is contained in:
@@ -2,6 +2,10 @@ import Queue, { QueueName } from "Common/Server/Infrastructure/Queue";
|
||||
|
||||
export default class WorkerQueueService {
|
||||
public static async getQueueSize(): Promise<number> {
|
||||
return Queue.getQueueSize(QueueName.Worker);
|
||||
const [workerSize, workflowSize]: [number, number] = await Promise.all([
|
||||
Queue.getQueueSize(QueueName.Worker),
|
||||
Queue.getQueueSize(QueueName.Workflow),
|
||||
]);
|
||||
return workerSize + workflowSize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user