Skip to content

Commit

Permalink
debug(buffer): log more and disable deletion of cache
Browse files Browse the repository at this point in the history
  • Loading branch information
lindesvard committed Feb 18, 2025
1 parent 8c640bc commit 3fd4382
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions apps/worker/src/jobs/events.create-session-end.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export async function createSessionEnd(
screenViews,
sessionDuration,
events,
lastScreenView: lastScreenView ? lastScreenView : 'none',
});

return createEvent({
Expand Down
14 changes: 7 additions & 7 deletions packages/db/src/buffers/event-buffer-redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ return "OK"

addEventToSession();
} else if (event.name === 'session_end') {
// Delete last screen view
multi.del(
this.getLastEventKey({
projectId: event.project_id,
profileId: event.profile_id,
}),
);
// // Delete last screen view
// multi.del(
// this.getLastEventKey({
// projectId: event.project_id,
// profileId: event.profile_id,
// }),
// );

// Check if session has any events
const eventCount = await redis.llen(sessionKey);
Expand Down

0 comments on commit 3fd4382

Please sign in to comment.