improve(db): do not use keys in redis

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-11 12:05:08 +01:00
parent 0cf73e299a
commit 848f475412
3 changed files with 9 additions and 10 deletions

View File

@@ -235,8 +235,7 @@ export function transformMinimalEvent(
}
export async function getLiveVisitors(projectId: string) {
const keys = await getRedisCache().keys(`live:event:${projectId}:*`);
return keys.length;
return getRedisCache().scard(`live:visitors:${projectId}`);
}
export async function getEvents(