Skip to content

gcStateDir

function gcStateDir(
stateDir,
tryAcquire,
options?): Promise<GcResult>;

Defined in: src/launcher/state.ts:203

Remove <hash>.lock/.sock/.meta triples whose worker is no longer accepting connections.

Parameter Type Description
stateDir string -
tryAcquire (lockPath) => Promise<(() => void) | null> Function provided by the lock module so we don’t pull the lock implementation into a circular import. Returns a release callback when the lock can be acquired non-blocking, or null when it’s already held (the worker is alive or another launch is in flight).
options? { excludeHash?: string; limit?: number; } -
options.excludeHash? string -
options.limit? number -

Promise<GcResult>