`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
)
| 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. |