tmp(buffer): get all sessions instead
This commit is contained in:
@@ -283,13 +283,10 @@ return "OK"
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const session of parsed) {
|
for (const session of parsed) {
|
||||||
// Might be redundant check
|
|
||||||
if (session.events.length > 1) {
|
|
||||||
sessions[session.sessionId] = session.events
|
sessions[session.sessionId] = session.events
|
||||||
.map((e) => getSafeJson<IClickhouseEvent>(e))
|
.map((e) => getSafeJson<IClickhouseEvent>(e))
|
||||||
.filter((e): e is IClickhouseEvent => e !== null);
|
.filter((e): e is IClickhouseEvent => e !== null);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return sessions;
|
return sessions;
|
||||||
}
|
}
|
||||||
@@ -336,7 +333,7 @@ return "OK"
|
|||||||
let now = performance.now();
|
let now = performance.now();
|
||||||
const [sessions, regularQueueEvents] = await Promise.all([
|
const [sessions, regularQueueEvents] = await Promise.all([
|
||||||
// (A) Fetch session events
|
// (A) Fetch session events
|
||||||
this.getEligableSessions({ minEventsInSession: 2 }),
|
this.getEligableSessions({ minEventsInSession: 1 }),
|
||||||
// (B) Fetch no-session events
|
// (B) Fetch no-session events
|
||||||
redis.lrange(this.regularQueueKey, 0, this.batchSize / 2 - 1),
|
redis.lrange(this.regularQueueKey, 0, this.batchSize / 2 - 1),
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user