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

Method cancelEvent

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

`io.cancelEvent()` allows you to cancel an event that was previously sent with `io.sendEvent()`. This will prevent any Jobs from running that are listening for that event if the event was sent with a delay * @param cacheKey * @param eventId * @returns

(cacheKey: string | any[], eventId: string)

Source from the content-addressed store, hash-verified

804 * @returns
805 */
806 async cancelEvent(cacheKey: string | any[], eventId: string) {
807 return await this.runTask(
808 cacheKey,
809 async (task) => {
810 return await this._triggerClient.cancelEvent(eventId);
811 },
812 {
813 name: "cancelEvent",
814 params: {
815 eventId,
816 },
817 properties: [
818 {
819 label: "id",
820 text: eventId,
821 },
822 ],
823 }
824 );
825 }
826
827 async updateSource(
828 cacheKey: string | any[],

Callers 1

events.tsFile · 0.45

Calls 1

runTaskMethod · 0.95

Tested by

no test coverage detected