From a81618007c2aabde0021575a7d3526a60aaef7dc Mon Sep 17 00:00:00 2001 From: Jackson Roberts Date: Wed, 8 Apr 2026 19:34:33 +0000 Subject: [PATCH] fix(worker): pass socket to enqueueDalpuriFullSync The socket retrieved from ensureManagerSocketReady() was never passed to enqueueDalpuriFullSync(), so inside createWorkerJob the socket.emit('requestId') call crashed with 'TypeError: undefined is not an object (evaluating A.emit)'. This caused every full sync job to fail immediately, leaving the DB empty. The 5s incremental sync interval then flooded the queue with 4700+ jobs that all failed too since there was no data. Also manually cleared the backlog of 4720 failed/pending incremental jobs and 2 failed full sync jobs from the production queue. --- api/src/workert.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/workert.ts b/api/src/workert.ts index d18be99..3c4b630 100644 --- a/api/src/workert.ts +++ b/api/src/workert.ts @@ -165,7 +165,7 @@ if (import.meta.main) { const { executeIncrementalSync } = await import("./modules/workers/dalpuri-sync"); await boss.work(WorkerQueue.DALPURI_FULL_SYNC, async () => { const socket = await ensureManagerSocketReady(); - await enqueueDalpuriFullSync(); + await enqueueDalpuriFullSync(socket); }); console.log("[worker] Registered DALPURI_FULL_SYNC job handler");