(now = Date.now())
| 352 | } |
| 353 | |
| 354 | function pruneExpiredMemoryStreams(now = Date.now()): void { |
| 355 | for (const [executionId, stream] of memoryExecutionStreams) { |
| 356 | if (stream.expiresAt <= now) { |
| 357 | memoryExecutionStreams.delete(executionId) |
| 358 | } |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | function getMemoryStream(executionId: string): MemoryExecutionStream { |
| 363 | pruneExpiredMemoryStreams() |
no test coverage detected