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

Method runTask

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

Source from the content-addressed store, hash-verified

84 }
85
86 runTask<T, TResult extends Json<T> | void>(
87 key: IntegrationTaskKey,
88 callback: (client: WebClient, task: IOTask, io: IO) => Promise<TResult>,
89 options?: RunTaskOptions,
90 errorCallback?: RunTaskErrorCallback
91 ): Promise<TResult> {
92 if (!this._io) throw new Error("No IO");
93 if (!this._connectionKey) throw new Error("No connection key");
94
95 return this._io.runTask(
96 key,
97 (task, io) => {
98 if (!this._client) throw new Error("No client");
99 return callback(this._client, task, io);
100 },
101 {
102 icon: "slack",
103 retry: retry.standardBackoff,
104 ...(options ?? {}),
105 connectionKey: this._connectionKey,
106 },
107 errorCallback
108 );
109 }
110
111 postMessage(
112 key: IntegrationTaskKey,

Callers 2

postMessageMethod · 0.95
joinConversationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected