await run.cancel();
console.log(run.data.status); // "cancelled"run.cancel()
print(run.data["status"]) # "cancelled"What it stops
The chain. No further step starts. A step already in flight finishes rather than being torn in half.
Every effect a completed step had is permanent: documents written, mail delivered, a site published, a DNS record changed. Cancel stops what has not happened yet.
It works on a waiting run too
An approval that will never come is a run that waits for ever. Cancelling is how it is closed, and the record shows it was cancelled rather than refused.
The record is kept
Every step that ran, with its output, its credits and its warnings. A cancelled run is still the account of what was done.
A cancelled run cannot be resumed
retry() is for a failed run. To do the work again, start a new run.