(ownerFilePath: string, owner: ProcessLockOwner)
| 60 | } |
| 61 | |
| 62 | function writeProcessLockOwner(ownerFilePath: string, owner: ProcessLockOwner): void { |
| 63 | const tmpOwnerFilePath = `${ownerFilePath}.${process.pid}.${Date.now()}.tmp`; |
| 64 | fs.writeFileSync(tmpOwnerFilePath, JSON.stringify(owner), 'utf8'); |
| 65 | fs.renameSync(tmpOwnerFilePath, ownerFilePath); |
| 66 | } |
| 67 | |
| 68 | function clearStaleProcessLock( |
| 69 | lockDirPath: string, |
no outgoing calls
no test coverage detected