* Start periodic cleanup of expired/stale sessions from the database. * Uses chained setTimeout (not setInterval) to prevent overlapping runs.
()
| 55 | * Uses chained setTimeout (not setInterval) to prevent overlapping runs. |
| 56 | */ |
| 57 | startCleanup() { |
| 58 | this._scheduleCleanup(5000); // First run 5s after startup. |
| 59 | } |
| 60 | |
| 61 | _scheduleCleanup(delay: number) { |
| 62 | this._cleanupTimer = setTimeout(async () => { |
no test coverage detected