MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / inspectSessionEndClaims

Function inspectSessionEndClaims

packages/db/scripts/check-sessions.ts:196–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194}
195
196async function inspectSessionEndClaims() {
197 const redis = getRedisCache();
198 let cursor = '0';
199 let count = 0;
200 do {
201 const [next, batch] = await redis.scan(
202 cursor,
203 'MATCH',
204 'session:end:emitted:*',
205 'COUNT',
206 1000
207 );
208 cursor = next;
209 count += batch.length;
210 } while (cursor !== '0' && count < 100_000);
211 return count;
212}
213
214async function sampleOldestSession(
215 projectId: string,

Callers 1

mainFunction · 0.85

Calls 1

getRedisCacheFunction · 0.90

Tested by

no test coverage detected