Revert "wip"

This reverts commit 336ba116a1.
This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-27 22:59:48 +02:00
parent b8e919efc1
commit 0e26ac6347

View File

@@ -38,14 +38,14 @@ export async function postEvent(
ua,
});
// // this will ensure that we don't have multiple events creating sessions
// const locked = await getRedisCache().set(
// `request:priority:${currentDeviceId}-${previousDeviceId}`,
// 'locked',
// 'EX',
// 10,
// 'NX'
// );
// this will ensure that we don't have multiple events creating sessions
const locked = await getRedisCache().set(
`request:priority:${currentDeviceId}-${previousDeviceId}`,
'locked',
'EX',
10,
'NX'
);
eventsQueue.add('event', {
type: 'incomingEvent',
@@ -60,7 +60,7 @@ export async function postEvent(
geo,
currentDeviceId,
previousDeviceId,
priority: false,
priority: locked === 'OK',
},
});