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