MCPcopy Create free account
hub / github.com/EvoMap/evolver / getLockFilePath

Function getLockFilePath

src/adapters/scripts/_lockPaths.js:29–36  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

27// basename differs from the default in that case (`evolver.pid` vs
28// `instance.lock`).
29function getLockFilePath(env) {
30 const e = env || process.env;
31 if (e.EVOLVER_LOCK_DIR) {
32 return path.join(e.EVOLVER_LOCK_DIR, 'evolver.pid');
33 }
34 // os.homedir() is cross-platform; process.env.HOME is unset on Windows.
35 return path.join(os.homedir(), '.evomap', 'instance.lock');
36}
37
38// Round-9: lease tunables for the daemon lock. A live daemon refreshes the
39// lock mtime every LOCK_REFRESH_MS; a lock whose mtime is older than

Callers 4

startLockRefreshFunction · 0.85
acquireLockFunction · 0.85
releaseLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected