MCPcopy Create free account
hub / github.com/tiann/hapi / clearRunnerState

Function clearRunnerState

cli/src/persistence.ts:209–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207 * Clean up runner state file and lock file
208 */
209export async function clearRunnerState(): Promise<void> {
210 if (existsSync(configuration.runnerStateFile)) {
211 await unlink(configuration.runnerStateFile);
212 }
213 // Also clean up lock file if it exists (for stale cleanup)
214 if (existsSync(configuration.runnerLockFile)) {
215 try {
216 await unlink(configuration.runnerLockFile);
217 } catch {
218 // Lock file might be held by running runner, ignore error
219 }
220 }
221}
222
223/**
224 * Acquire an exclusive lock file for the runner.

Callers 2

cleanupRunnerStateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected