Function
scheduleCleanup
(local: LocalProcessState, id: string, processState: ActiveProcess)
Source from the content-addressed store, hash-verified
| 52 | } |
| 53 | |
| 54 | function scheduleCleanup(local: LocalProcessState, id: string, processState: ActiveProcess): void { |
| 55 | if (processState.cleanup) clearTimeout(processState.cleanup) |
| 56 | processState.cleanup = setTimeout(() => { |
| 57 | local.active.delete(id) |
| 58 | if (processState.tempScriptPath) fs.rm(processState.tempScriptPath, { force: true }).catch(() => undefined) |
| 59 | }, CLEANUP_DELAY_MS) |
| 60 | processState.cleanup.unref?.() |
| 61 | } |
| 62 | |
| 63 | async function startChild(local: LocalProcessState, params: { |
| 64 | command: string |
Tested by
no test coverage detected