OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
Revert "wip"
Carl-Gerhard Lindesvärd0e26ac63475e
diff --git a/apps/api/src/controllers/event.controller.ts b/apps/api/src/controllers/event.controller.tsindex 68858e8dd..24e9ef11e 100644--- a/apps/api/src/controllers/event.controller.ts+++ b/apps/api/src/controllers/event.controller.ts@@ -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',},});