🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat: add all queues to get api for bullmq api (#4422)
Max Deichmanne24f65c51d6e
diff --git a/web/src/pages/api/admin/bullmq/index.ts b/web/src/pages/api/admin/bullmq/index.tsindex 4b2f3ee68a..873419d5c4 100644--- a/web/src/pages/api/admin/bullmq/index.ts+++ b/web/src/pages/api/admin/bullmq/index.ts@@ -82,19 +82,17 @@ export default async function handler(}if (req.method === "GET") {- const queues = [- QueueName.LegacyIngestionQueue,- QueueName.BatchExport,- QueueName.DatasetRunItemUpsert,- QueueName.EvaluationExecution,- QueueName.TraceUpsert,- QueueName.IngestionQueue,- ];+ const queues = Object.values(QueueName);const queueCounts = await Promise.all(queues.map(async (queueName) => {- const queue = getQueue(queueName);- const jobCount = await queue?.getJobCounts();- return { queueName, jobCount };+ try {+ const queue = getQueue(queueName);+ const jobCount = await queue?.getJobCounts();+ return { queueName, jobCount };+ } catch (e) {+ logger.error(`Failed to get job count for queue ${queueName}`, e);+ return { queueName, jobCount: NaN };+ }}),);return res.status(200).json(queueCounts);