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

Function startLockRefresh

index.js:647–659  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

645// keeps the event loop open on its own, but fires for as long as the daemon
646// is otherwise alive.
647function startLockRefresh() {
648 if (_lockRefreshTimer) return;
649 const lockFile = getLockFilePath();
650 _lockRefreshTimer = setInterval(function () {
651 try {
652 const now = new Date();
653 fs.utimesSync(lockFile, now, now);
654 } catch (_) { /* lock gone / FS error: nothing we can do here */ }
655 }, LOCK_REFRESH_MS);
656 if (_lockRefreshTimer && typeof _lockRefreshTimer.unref === 'function') {
657 _lockRefreshTimer.unref();
658 }
659}
660
661function stopLockRefresh() {
662 if (_lockRefreshTimer) {

Callers 1

mainFunction · 0.85

Calls 1

getLockFilePathFunction · 0.85

Tested by

no test coverage detected