fix(monitoring): report observed research and paper readiness (O02)
This commit is contained in:
parent
70d173a908
commit
8c858b9d5c
23 changed files with 1340 additions and 319 deletions
|
|
@ -569,7 +569,7 @@ export class Queue {
|
|||
/**
|
||||
* Get count of active workers from BullMQ
|
||||
*/
|
||||
async getActiveWorkerCount(): Promise<number> {
|
||||
async getActiveWorkerCount(): Promise<number | undefined> {
|
||||
try {
|
||||
const workers = await this.bullQueue.getWorkers();
|
||||
return workers.length;
|
||||
|
|
@ -578,7 +578,9 @@ export class Queue {
|
|||
queueName: this.queueName,
|
||||
error,
|
||||
});
|
||||
return 0;
|
||||
// The optional QueueStats.workers capability distinguishes an unavailable
|
||||
// observation from a successful query that found zero workers.
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue