MCPcopy Create free account
hub / github.com/agent-tower/core / scheduleRestart

Function scheduleRestart

packages/server/scripts/dev.mjs:74–88  ·  view source on GitHub ↗
(changedPath)

Source from the content-addressed store, hash-verified

72 }, 100);
73}
74
75function scheduleRestart(changedPath) {
76 if (shuttingDown || restartInProgress) {
77 return;
78 }
79
80 if (restartTimer) {
81 clearTimeout(restartTimer);
82 }
83
84 restartTimer = setTimeout(() => {
85 restartTimer = null;
86 syncWatchers();
87 restartServer(changedPath);
88 }, 150);
89}
90
91function addWatcher(dir) {

Callers 1

addWatcherFunction · 0.85

Calls 2

syncWatchersFunction · 0.85
restartServerFunction · 0.85

Tested by

no test coverage detected