MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / readLock

Function readLock

source code/utils/cronTasksLock.ts:55–64  ·  view source on GitHub ↗
(dir?: string)

Source from the content-addressed store, hash-verified

53}
54
55async function readLock(dir?: string): Promise<SchedulerLock | undefined> {
56 let raw: string
57 try {
58 raw = await readFile(getLockPath(dir), 'utf8')
59 } catch {
60 return undefined
61 }
62 const result = schedulerLockSchema().safeParse(safeParseJSON(raw, false))
63 return result.success ? result.data : undefined
64}
65
66async function tryCreateExclusive(
67 lock: SchedulerLock,

Callers 2

tryAcquireSchedulerLockFunction · 0.70
releaseSchedulerLockFunction · 0.70

Calls 2

readFileFunction · 0.85
getLockPathFunction · 0.70

Tested by

no test coverage detected