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

Function releaseSchedulerLock

src/utils/cronTasksLock.ts:178–195  ·  view source on GitHub ↗
(
  opts?: SchedulerLockOptions,
)

Source from the content-addressed store, hash-verified

176 * Release the scheduler lock if the current session owns it.
177 */
178export async function releaseSchedulerLock(
179 opts?: SchedulerLockOptions,
180): Promise<void> {
181 unregisterCleanup?.()
182 unregisterCleanup = undefined
183 lastBlockedBy = undefined
184
185 const dir = opts?.dir
186 const sessionId = opts?.lockIdentity ?? getSessionId()
187 const existing = await readLock(dir)
188 if (!existing || existing.sessionId !== sessionId) return
189 try {
190 await unlink(getLockPath(dir))
191 logForDebugging('[ScheduledTasks] released scheduler lock')
192 } catch {
193 // Already gone.
194 }
195}

Callers 3

enableFunction · 0.85
stopFunction · 0.85
registerLockCleanupFunction · 0.85

Calls 5

getSessionIdFunction · 0.85
unlinkFunction · 0.85
logForDebuggingFunction · 0.85
readLockFunction · 0.70
getLockPathFunction · 0.70

Tested by

no test coverage detected