fix(worker): try speed up

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-23 20:06:30 +02:00
parent 88440c46f3
commit a1278ca371

View File

@@ -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(