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

Method runTask

integrations/shopify/src/index.ts:168–197  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    callback: (
      client: ReturnType<Shopify["createClient"]>,
      task: IOTask,
      io: IO,
      session: Session
    ) => Promise<TResult>,
    options?: RunTaskOptions,
    errorCallback?: RunTaskErrorCallback
  )

Source from the content-addressed store, hash-verified

166 }
167
168 runTask<T, TResult extends Json<T> | void>(
169 key: IntegrationTaskKey,
170 callback: (
171 client: ReturnType<Shopify["createClient"]>,
172 task: IOTask,
173 io: IO,
174 session: Session
175 ) => Promise<TResult>,
176 options?: RunTaskOptions,
177 errorCallback?: RunTaskErrorCallback
178 ): Promise<TResult> {
179 if (!this._io) throw new Error("No IO");
180 if (!this._connectionKey) throw new Error("No connection key");
181
182 return this._io.runTask<TResult>(
183 key,
184 (task, io) => {
185 if (!this._client) throw new Error("No client");
186 if (!this._session) throw new Error("No session");
187 return callback(this._client, task, io, this._session);
188 },
189 {
190 icon: "shopify",
191 retry: retry.standardBackoff,
192 ...(options ?? {}),
193 connectionKey: this._connectionKey,
194 },
195 errorCallback ?? onError
196 );
197 }
198
199 /**
200 * Creates a webhook trigger.

Callers 8

findMethod · 0.45
#allSinglePageMethod · 0.45
allMethod · 0.45
countMethod · 0.45
saveMethod · 0.45
deleteMethod · 0.45
#createWithFetchMethod · 0.45
createWebhookEventSourceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected