Parameters
string
required
The event ID to cancel the job runs for. This is returned when calling either
client.sendEvent() or
io.sendEvent().
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
const event = client.sendEvent({
name: "test.job",
});
// Some time later...
const res = await client.cancelRunsForEvent(event.id);
console.log(res.cancelledRunIds);
console.log(res.failedToCancelRunIds);
The cancelRunsForEvent() instance method will cancel all the job runs (yet to be executed) that are triggered by a given eventId.
const event = client.sendEvent({
name: "test.job",
});
// Some time later...
const res = await client.cancelRunsForEvent(event.id);
console.log(res.cancelledRunIds);
console.log(res.failedToCancelRunIds);
Was this page helpful?
