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

Function isLive

apps/api/src/controllers/track.controller.ts:507–510  ·  view source on GitHub ↗
(s: typeof current)

Source from the content-addressed store, hash-verified

505 // server to start a fresh session id on the next event.
506 const now = Date.now();
507 const isLive = (s: typeof current) =>
508 !!s &&
509 now - convertClickhouseDateToJs(s.ended_at).getTime() <
510 SESSION_TIMEOUT_MS;
511
512 if (current && isLive(current)) {
513 return reply.status(200).send({

Callers 1

fetchDeviceIdFunction · 0.85

Calls 1

Tested by

no test coverage detected