MCPcopy Index your code
hub / github.com/devcontainers/cli / poll

Function poll

src/spec-node/utils.ts:224–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222 started: new Promise<void>((resolve, reject) => {
223 canceled.catch(reject);
224 const poll = async () => {
225 while (!stopped) {
226 try {
227 const containers = await listContainers(params, false, labelFilters);
228 if (trace) {
229 output.write(`Log: startEventSeenPolling found ${containers.length} container(s)\r\n`);
230 }
231 if (containers.length > 0) {
232 resolve();
233 return;
234 }
235 } catch (e) {
236 // Ignore transient errors during polling.
237 }
238 await delay(500);
239 }
240 };
241 poll();
242 })
243 };

Callers 1

startEventSeenPollingFunction · 0.85

Calls 4

listContainersFunction · 0.90
delayFunction · 0.90
resolveFunction · 0.85
writeMethod · 0.65

Tested by

no test coverage detected