MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ownerLockPath

Function ownerLockPath

apps/local/src/db/data-dir-ownership.ts:23–30  ·  view source on GitHub ↗
(dataDir: string)

Source from the content-addressed store, hash-verified

21const toLibsqlFileUrl = (path: string): string => pathToFileURL(resolve(path)).href;
22
23const ownerLockPath = (dataDir: string): string => {
24 mkdirSync(dataDir, { recursive: true });
25 // realpath collapses symlinked EXECUTOR_DATA_DIR values so normal local
26 // installs contend on one lock inode. It intentionally does not claim to
27 // detect hardlinked/bind-mounted data.db files in distinct real directories,
28 // nor to make network-filesystem locks reliable.
29 return join(realpathSync(dataDir), LOCK_DATABASE_FILENAME);
30};
31
32const isRecord = (value: unknown): value is Record<string, unknown> =>
33 typeof value === "object" && value !== null;

Callers 1

acquireDataDirOwnershipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected