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

Method runTask

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

Source from the content-addressed store, hash-verified

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

Callers 8

getRecordsMethod · 0.45
getRecordMethod · 0.45
createRecordsMethod · 0.45
updateRecordsMethod · 0.45
deleteRecordsMethod · 0.45
createMethod · 0.45
listMethod · 0.45
deleteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected