(s: typeof current)
| 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({ |
no test coverage detected