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

Function waitFor

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

Source from the content-addressed store, hash-verified

224}
225
226async function waitFor(what, probe, attempts = 90) {
227 for (let i = 0; i < attempts; i++) {
228 try {
229 if (await probe()) return true;
230 } catch {
231 /* not up yet */
232 }
233 await sleep(1000);
234 }
235 throw new Error(`timed out waiting for ${what}`);
236}
237
238async function main() {
239 const browserPath = findBrowser();

Callers 1

mainFunction · 0.70

Calls 2

sleepFunction · 0.70
probeFunction · 0.50

Tested by

no test coverage detected