- JobSubmissionClient.stop_job(job_id: str) bool [source]#
Request a job to exit asynchronously.
Attempts to terminate process first, then kills process after timeout.
>>> from ray.job_submission import JobSubmissionClient >>> client = JobSubmissionClient("http://127.0.0.1:8265") >>> sub_id = client.submit_job(entrypoint="sleep 10") >>> client.stop_job(sub_id) True
job_id – The job ID or submission ID for the job to be stopped.
True if the job was running, otherwise False.
RuntimeError – If the job does not exist or if the request to the job server fails.
PublicAPI: This API is stable across Ray releases.