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

Function doRuns

references/v3-catalog/src/management.ts:92–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92async function doRuns() {
93 const run = await simpleChildTask.trigger({ message: "Hello, World!" });
94
95 const retrievedRun = await runs.retrieve(run.id);
96 console.log("retrieved run", retrievedRun);
97
98 const completedRun = await waitForRunToComplete(run.id);
99 console.log("completed run", completedRun);
100
101 const failingRun = await taskThatErrors.trigger({ message: "Hello, World!" });
102 const failedRun = await waitForRunToComplete(failingRun.id);
103
104 console.log("failed run", failedRun);
105
106 const replayableRun = await runs.replay(failedRun.id);
107 const replayedRun = await waitForRunToExecute(replayableRun.id);
108
109 console.log("replayed run", replayedRun);
110
111 const canceledRun = await runs.cancel(replayedRun.id);
112 const canceledRunResult = await waitForRunToComplete(canceledRun.id);
113
114 console.log("canceled run", canceledRunResult);
115}
116
117async function doListRuns() {
118 let pageCount = 0;

Callers

nothing calls this directly

Calls 6

waitForRunToCompleteFunction · 0.85
waitForRunToExecuteFunction · 0.85
logMethod · 0.65
triggerMethod · 0.45
retrieveMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…