MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / waitForPort

Function waitForPort

dev/local/runner.ts:75–82  ·  view source on GitHub ↗
(port: number, name: string, maxWaitMs: number)

Source from the content-addressed store, hash-verified

73 if (await probePort(port)) return;
74 await sleep(500);
75 }
76 console.warn(`⚠ ${name} on port ${port} did not become ready within ${maxWaitMs / 1000}s`);
77}
78
79export function buildStartCommand(serviceName: string, serviceNames?: readonly string[]): string {
80 const svc = getService(serviceName);
81 const command = serviceNames ? serviceCommand(serviceName, serviceNames) : svc.command;
82
83 // Use pnpm --filter instead of cd to avoid cwd issues on restart —
84 // after ctrl-c the shell stays in the service dir, so a relative cd
85 // would try to descend into <dir>/<dir> which doesn't exist.

Callers 1

startInfraFunction · 0.85

Calls 3

probePortFunction · 0.85
sleepFunction · 0.70
warnMethod · 0.65

Tested by

no test coverage detected