Skip to content

JobClient.cancel

def JobClient.cancel(job_or_id: Job | str)

Cancel a job. When a job is canceled, no queued tasks will be picked up by runners and executed even if runners are idle. Tasks that are already being executed will finish their execution and not be interrupted. All sub-tasks spawned from such tasks after the cancellation will not be picked up by runners.

job_or_id Job | str

The job or job id to cancel.