fix(buffer): live counter

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-11 21:38:26 +01:00
parent 848f475412
commit 3205ea0a31
6 changed files with 56 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
import { mergeDeepRight, omit, uniq } from 'ramda';
import { mergeDeepRight, uniq } from 'ramda';
import { escape } from 'sqlstring';
import { v4 as uuid } from 'uuid';
import { toDots } from '@openpanel/common';
import { cacheable, getRedisCache } from '@openpanel/redis';
import { cacheable } from '@openpanel/redis';
import type { IChartEventFilter } from '@openpanel/validation';
import { botBuffer, eventBuffer } from '../buffers';
@@ -234,10 +234,6 @@ export function transformMinimalEvent(
};
}
export async function getLiveVisitors(projectId: string) {
return getRedisCache().scard(`live:visitors:${projectId}`);
}
export async function getEvents(
sql: string,
options: GetEventsOptions = {},