MCPcopy
hub / github.com/triggerdotdev/trigger.dev / runTask

Method runTask

references/unit-testing/dummy-integration/index.ts:48–70  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    callback: (client: DummyClient, task: IOTask, io: IO) => Promise<TResult>,
    options?: RunTaskOptions,
    errorCallback?: RunTaskErrorCallback
  )

Source from the content-addressed store, hash-verified

46 }
47
48 runTask<T, TResult extends Json<T> | void>(
49 key: IntegrationTaskKey,
50 callback: (client: DummyClient, task: IOTask, io: IO) => Promise<TResult>,
51 options?: RunTaskOptions,
52 errorCallback?: RunTaskErrorCallback
53 ): Promise<TResult> {
54 if (!this._io) throw new Error("No IO");
55 if (!this._connectionKey) throw new Error("No connection key");
56 return this._io.runTask(
57 key,
58 (task, io) => {
59 if (!this._client) throw new Error("No client");
60 return callback(this._client, task, io);
61 },
62 {
63 icon: "dummy",
64 retry: retry.standardBackoff,
65 ...(options ?? {}),
66 connectionKey: this._connectionKey,
67 },
68 errorCallback
69 );
70 }
71
72 taskOne(key: IntegrationTaskKey, params: Record<string, any>): Promise<void> {
73 return this.runTask(

Callers 15

taskOneMethod · 0.95
taskTwoMethod · 0.95
index.tsFile · 0.45
openai.tsFile · 0.45
status.tsFile · 0.45
invoke.tsFile · 0.45
redacted.tsFile · 0.45
github.tsFile · 0.45
auto-yield.tsFile · 0.45
events.tsFile · 0.45
supabase.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected