dashboard/modules/job/sdk.py
def stop_job(
        self,
        job_id: str,
    ) -> bool:
        """Request a job to exit asynchronously.

        Example:
            >>> from ray.job_submission import JobSubmissionClient
            >>> client = JobSubmissionClient("http://127.0.0.1:8265") # doctest: +SKIP
            >>> job_id = client.submit_job(entrypoint="sleep 10") # doctest: +SKIP
            >>> client.stop_job(job_id) # doctest: +SKIP
            True

        Args:
            job_id: The job ID for the job to be stopped.

        Returns:
            True if the job was running, otherwise False.

        Raises:
            RuntimeError: If the job does not exist or if the request to the
            job server fails.
        """
        logger.debug(f"Stopping job with job_id={job_id}.")
        r = self._do_request("POST", f"/api/jobs/{job_id}/stop")

        if r.status_code == 200:
            return JobStopResponse(**r.json()).stopped
        else:
            self._raise_error(r)
Request a job to exit asynchronously.

        Example:
            >>> from ray.job_submission import JobSubmissionClient
            >>> client = JobSubmissionClient("http://127.0.0.1:8265") # doctest: +SKIP
            >>> job_id = client.submit_job(entrypoint="sleep 10") # doctest: +SKIP
            >>> client.stop_job(job_id) # doctest: +SKIP
            True

        Args:
            job_id: The job ID for the job to be stopped.

        Returns:
            True if the job was running, otherwise False.

        Raises:
            RuntimeError: If the job does not exist or if the request to the
            job server fails.
        
Request a job to exit asynchronously.

The job ID for the job to be stopped.

True if the job was running, otherwise False.

If the job does not exist or if the request to the
job server fails.
Request a job to exit asynchronously . The job ID for the job to be stopped . True if the job was running otherwise False . If the job does not exist or if the request to the job server fails .
def stop_job(
        self,
        job_id: str,
    ) -> bool:
        logger.debug(f"Stopping job with job_id={job_id}.")
        r = self._do_request("POST", f"/api/jobs/{job_id}/stop")
        if r.status_code == 200:
            return JobStopResponse(**r.json()).stopped
        else:
            self._raise_error(r)
def stop_job ( self , job_id : str , ) -> bool : logger . debug ( f"Stopping job with job_id={job_id}." ) r = self . _do_request ( "POST" , f"/api/jobs/{job_id}/stop" ) if r . status_code == 200 : return JobStopResponse ( ** r . json ( ) ) . stopped else : self . _raise_error ( r )
Request a job to exit asynchronously.
Request a job to exit asynchronously .
"""Request a job to exit asynchronously.

        Example:
            >>> from ray.job_submission import JobSubmissionClient
            >>> client = JobSubmissionClient("http://127.0.0.1:8265") # doctest: +SKIP
            >>> job_id = client.submit_job(entrypoint="sleep 10") # doctest: +SKIP
            >>> client.stop_job(job_id) # doctest: +SKIP
            True

        Args:
            job_id: The job ID for the job to be stopped.

        Returns:
            True if the job was running, otherwise False.

        Raises:
            RuntimeError: If the job does not exist or if the request to the
            job server fails.
        """
self
job_id
str