MCPcopy Index your code
hub / github.com/liuup/claude-code-analysis / readLock

Function readLock

src/utils/cronTasksLock.ts:53–62  ·  view source on GitHub ↗
(dir?: string)

Source from the content-addressed store, hash-verified

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

Callers 2

tryAcquireSchedulerLockFunction · 0.70
releaseSchedulerLockFunction · 0.70

Calls 2

readFileFunction · 0.85
getLockPathFunction · 0.70

Tested by

no test coverage detected