MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / waitFor

Function waitFor

telemetry-dashboard/scripts/render-check.mjs:219–229  ·  view source on GitHub ↗
(what, probe, attempts = 90)

Source from the content-addressed store, hash-verified

217}
218
219async function waitFor(what, probe, attempts = 90) {
220 for (let i = 0; i < attempts; i++) {
221 try {
222 if (await probe()) return true;
223 } catch {
224 /* not up yet */
225 }
226 await sleep(1000);
227 }
228 throw new Error(`timed out waiting for ${what}`);
229}
230
231async function main() {
232 const browserPath = findBrowser();

Callers 1

mainFunction · 0.70

Calls 2

sleepFunction · 0.70
probeFunction · 0.50

Tested by

no test coverage detected