`io.sendEvents()` allows you to send multiple events from inside a Job run. The sent events will trigger any Jobs that are listening for those events (based on the name). * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentat
(cacheKey: string | any[], events: SendEvent[], options?: SendEventOptions)
| 759 | * @param options Options for sending the events. |
| 760 | */ |
| 761 | async sendEvents(cacheKey: string | any[], events: SendEvent[], options?: SendEventOptions) { |
| 762 | return await this.runTask( |
| 763 | cacheKey, |
| 764 | async (task) => { |
| 765 | return await this._triggerClient.sendEvents(events, options); |
| 766 | }, |
| 767 | { |
| 768 | name: "Send Multiple Events", |
| 769 | params: { events, options }, |
| 770 | icon: "send", |
| 771 | properties: [ |
| 772 | { |
| 773 | label: "Total Events", |
| 774 | text: String(events.length), |
| 775 | }, |
| 776 | ...sendEventOptionsProperties(options), |
| 777 | ], |
| 778 | } |
| 779 | ); |
| 780 | } |
| 781 | |
| 782 | async getEvent(cacheKey: string | any[], id: string) { |
| 783 | return await this.runTask( |
no test coverage detected