python/ray/serve/client.py
def shutdown(self) -> None:
        """Completely shut down the connected Serve instance.

        Shuts down all processes and deletes all state associated with the
        instance.
        """
        if ray.is_initialized() and not self._shutdown:
            ray.get(self._controller.shutdown.remote())
            self._wait_for_deployments_shutdown()

            ray.kill(self._controller, no_restart=True)

            # Wait for the named actor entry gets removed as well.
            started = time.time()
            while True:
                try:
                    controller_namespace = get_controller_namespace(
                        self._detached,
                        self._override_controller_namespace,
                    )
                    ray.get_actor(self._controller_name, namespace=controller_namespace)
                    if time.time() - started > 5:
                        logger.warning(
                            "Waited 5s for Serve to shutdown gracefully but "
                            "the controller is still not cleaned up. "
                            "You can ignore this warning if you are shutting "
                            "down the Ray cluster."
                        )
                        break
                except ValueError:  # actor name is removed
                    break

            self._shutdown = True
Completely shut down the connected Serve instance.

        Shuts down all processes and deletes all state associated with the
        instance.
        
Completely shut down the connected Serve instance.
Shuts down all processes and deletes all state associated with the
instance.
Completely shut down the connected Serve instance . Shuts down all processes and deletes all state associated with the instance .
def shutdown(self) -> None:
        if ray.is_initialized() and not self._shutdown:
            ray.get(self._controller.shutdown.remote())
            self._wait_for_deployments_shutdown()
            ray.kill(self._controller, no_restart=True)
            started = time.time()
            while True:
                try:
                    controller_namespace = get_controller_namespace(
                        self._detached,
                        self._override_controller_namespace,
                    )
                    ray.get_actor(self._controller_name, namespace=controller_namespace)
                    if time.time() - started > 5:
                        logger.warning(
                            "Waited 5s for Serve to shutdown gracefully but "
                            "the controller is still not cleaned up. "
                            "You can ignore this warning if you are shutting "
                            "down the Ray cluster."
                        )
                        break
                except ValueError:  
                    break
            self._shutdown = True
def shutdown ( self ) -> None : if ray . is_initialized ( ) and not self . _shutdown : ray . get ( self . _controller . shutdown . remote ( ) ) self . _wait_for_deployments_shutdown ( ) ray . kill ( self . _controller , no_restart = True ) started = time . time ( ) while True : try : controller_namespace = get_controller_namespace ( self . _detached , self . _override_controller_namespace , ) ray . get_actor ( self . _controller_name , namespace = controller_namespace ) if time . time ( ) - started > 5 : logger . warning ( "Waited 5s for Serve to shutdown gracefully but " "the controller is still not cleaned up. " "You can ignore this warning if you are shutting " "down the Ray cluster." ) break except ValueError : break self . _shutdown = True
Completely shut down the connected Serve instance.
Completely shut down the connected Serve instance .
"""Completely shut down the connected Serve instance.

        Shuts down all processes and deletes all state associated with the
        instance.
        """ # Wait for the named actor entry gets removed as well. # actor name is removed
self