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

Method runTask

integrations/plain/src/index.ts:75–97  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    callback: (client: PlainClient, task: IOTask, io: IO) => Promise<TResult>,
    options?: RunTaskOptions,
    errorCallback?: RunTaskErrorCallback
  )

Source from the content-addressed store, hash-verified

73 }
74
75 runTask<T, TResult extends Json<T> | void>(
76 key: IntegrationTaskKey,
77 callback: (client: PlainClient, task: IOTask, io: IO) => Promise<TResult>,
78 options?: RunTaskOptions,
79 errorCallback?: RunTaskErrorCallback
80 ): Promise<TResult> {
81 if (!this._io) throw new Error("No IO");
82 if (!this._connectionKey) throw new Error("No connection key");
83 return this._io.runTask(
84 key,
85 (task, io) => {
86 if (!this._client) throw new Error("No client");
87 return callback(this._client, task, io);
88 },
89 {
90 icon: "plain",
91 retry: retry.standardBackoff,
92 ...(options ?? {}),
93 connectionKey: this._connectionKey,
94 },
95 errorCallback
96 );
97 }
98
99 getCustomerById(
100 key: IntegrationTaskKey,

Callers 3

getCustomerByIdMethod · 0.95
upsertCustomerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected