minor worker fix
This commit is contained in:
@@ -47,10 +47,7 @@ export async function incomingEvent(job: Job<EventsQueuePayloadIncomingEvent>) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// this will get the profileId from the alias table if it exists
|
// this will get the profileId from the alias table if it exists
|
||||||
const profileId = await getProfileIdCached({
|
const profileId = body.profileId ?? '';
|
||||||
profileId: body.profileId,
|
|
||||||
projectId,
|
|
||||||
});
|
|
||||||
const createdAt = new Date(body.timestamp);
|
const createdAt = new Date(body.timestamp);
|
||||||
const url = getProperty('__path');
|
const url = getProperty('__path');
|
||||||
const { path, hash, query, origin } = parsePath(url);
|
const { path, hash, query, origin } = parsePath(url);
|
||||||
|
|||||||
@@ -459,6 +459,10 @@ export async function getLastScreenViewFromProfileId({
|
|||||||
profileId: string;
|
profileId: string;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
}) {
|
}) {
|
||||||
|
if (!profileId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const eventInBuffer = await eventBuffer.find(
|
const eventInBuffer = await eventBuffer.find(
|
||||||
(item) => item.event.profile_id === profileId
|
(item) => item.event.profile_id === profileId
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user