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

Method #forceYield

packages/trigger-sdk/src/io.ts:1505–1524  ·  view source on GitHub ↗
(location: string, task?: ServerTask, output?: string)

Source from the content-addressed store, hash-verified

1503 }
1504
1505 #forceYield(location: string, task?: ServerTask, output?: string) {
1506 const timeRemaining = this.#getRemainingTimeInMillis();
1507
1508 if (timeRemaining) {
1509 if (task) {
1510 throw new AutoYieldWithCompletedTaskExecutionError(
1511 task.id,
1512 task.outputProperties ?? [],
1513 {
1514 location,
1515 timeRemaining,
1516 timeElapsed: this.#getTimeElapsed(),
1517 },
1518 output
1519 );
1520 } else {
1521 throw new AutoYieldExecutionError(location, timeRemaining, this.#getTimeElapsed());
1522 }
1523 }
1524 }
1525
1526 #getTimeElapsed() {
1527 return performance.now() - this._timeOrigin;

Callers 2

runTaskMethod · 0.95
executeTaskMethod · 0.95

Calls 2

#getTimeElapsedMethod · 0.95

Tested by

no test coverage detected