Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: await closure of bull queues (#3007)

Max Deichmann8f742f660af9
diff --git a/worker/src/utils/shutdown.ts b/worker/src/utils/shutdown.ts
index 1242acb511..e91e359c31 100644
--- a/worker/src/utils/shutdown.ts
+++ b/worker/src/utils/shutdown.ts
@@ -31,7 +31,7 @@ export const onShutdown: NodeJS.SignalsListener = async (signal) => {
cloudUsageMeteringJobExecutor,
];
- await Promise.all(workers.map((worker) => worker?.close()));
+ await Promise.all(workers.map(async (worker) => await worker?.close()));
logger.info("All workers have been closed.");
// Flush all pending writes to Clickhouse AFTER closing ingestion queue worker that is writing to it