MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / scheduleCleanup

Function scheduleCleanup

projects/runtime-node/src/localProcess.ts:54–61  ·  view source on GitHub ↗
(local: LocalProcessState, id: string, processState: ActiveProcess)

Source from the content-addressed store, hash-verified

52}
53
54function 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
63async function startChild(local: LocalProcessState, params: {
64 command: string

Callers 1

startChildFunction · 0.70

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected