()
| 207 | * Clean up runner state file and lock file |
| 208 | */ |
| 209 | export 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. |
no outgoing calls
no test coverage detected