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

Method createStatus

packages/trigger-sdk/src/io.ts:530–538  ·  view source on GitHub ↗

`io.createStatus()` allows you to set a status with associated data during the Run. Statuses can be used by your UI using the react package * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for

(
    cacheKey: IntegrationTaskKey,
    initialStatus: InitialStatusUpdate
  )

Source from the content-addressed store, hash-verified

528 * ```
529 */
530 async createStatus(
531 cacheKey: IntegrationTaskKey,
532 initialStatus: InitialStatusUpdate
533 ): Promise<TriggerStatus> {
534 const id = typeof cacheKey === "string" ? cacheKey : cacheKey.join("-");
535 const status = new TriggerStatus(id, this);
536 await status.update(cacheKey, initialStatus);
537 return status;
538 }
539
540 /** `io.backgroundFetch()` fetches data from a URL that can take longer that the serverless timeout. The actual `fetch` request is performed on the Trigger.dev platform, and the response is sent back to you.
541 * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.

Callers 3

status.tsFile · 0.80
invoke.tsFile · 0.80
hooks.tsFile · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected