MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / waitForRunToComplete

Function waitForRunToComplete

references/v3-catalog/src/management.ts:170–182  ·  view source on GitHub ↗
(runId: string)

Source from the content-addressed store, hash-verified

168}
169
170async function waitForRunToComplete(runId: string) {
171 let run = await runs.retrieve(runId);
172
173 while (!run.isCompleted) {
174 console.log("run is not completed, waiting...", run);
175 await new Promise((resolve) => setTimeout(resolve, 2000));
176 run = await runs.retrieve(runId);
177 }
178
179 console.log("run is completed", run);
180
181 return run;
182}
183
184async function waitForRunToExecute(runId: string) {
185 let run = await runs.retrieve(runId);

Callers 2

doRunsFunction · 0.85

Calls 2

logMethod · 0.65
retrieveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…