From a1278ca371ac5840f29a0ee9a91f008a6b5b5949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Mon, 23 Sep 2024 20:06:30 +0200 Subject: [PATCH] fix(worker): try speed up --- apps/worker/src/jobs/events.incoming-event.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/worker/src/jobs/events.incoming-event.ts b/apps/worker/src/jobs/events.incoming-event.ts index 0ec1c515..67aabeb1 100644 --- a/apps/worker/src/jobs/events.incoming-event.ts +++ b/apps/worker/src/jobs/events.incoming-event.ts @@ -191,7 +191,7 @@ function getSessionEndWithPriority( return async (args) => { const res = await getSessionEnd(args); - if (count > 10) { + if (count > 3) { throw new Error('Failed to get session end'); } @@ -216,7 +216,7 @@ async function getSessionEnd({ previousDeviceId: string; }) { const currentSessionEndKeys = await getRedisQueue().keys( - `*:sessionEnd:${projectId}:${currentDeviceId}:*`, + `bull:sessions:sessionEnd:${projectId}:${currentDeviceId}:*`, ); const sessionEndJobCurrentDeviceId = await findJobByPrefix( @@ -229,7 +229,7 @@ async function getSessionEnd({ } const previousSessionEndKeys = await getRedisQueue().keys( - `*:sessionEnd:${projectId}:${previousDeviceId}:*`, + `bull:sessions:sessionEnd:${projectId}:${previousDeviceId}:*`, ); const sessionEndJobPreviousDeviceId = await findJobByPrefix(