MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / fetchQueueCounts

Function fetchQueueCounts

apps/api/src/queues/queue-manager.ts:61–74  ·  view source on GitHub ↗
(
  queue: IManagedQueue
)

Source from the content-addressed store, hash-verified

59] as const;
60
61const fetchQueueCounts = async (
62 queue: IManagedQueue
63): Promise<IQueueCounts> => {
64 const counts = await queue.getJobCounts(...QUEUE_COUNT_STATES);
65
66 return {
67 waiting: counts.waiting ?? 0,
68 active: counts.active ?? 0,
69 completed: counts.completed ?? 0,
70 failed: counts.failed ?? 0,
71 delayed: counts.delayed ?? 0,
72 paused: counts.paused ?? 0,
73 };
74};
75
76/**
77 * Centralized lifecycle + dispatch surface for every BullMQ queue in the

Callers 1

getStatsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected