python/ray/serve/deployment_state.py
def _set_deployment_goal(self, deployment_info: Optional[DeploymentInfo]) -> None:
        """
        Set desirable state for a given deployment, identified by tag.

        Args:
            deployment_info (Optional[DeploymentInfo]): Contains deployment and
                replica config, if passed in as None, we're marking
                target deployment as shutting down.
        """
        if deployment_info is not None:
            self._target_info = deployment_info
            self._target_replicas = deployment_info.deployment_config.num_replicas

            self._target_version = DeploymentVersion(
                deployment_info.version,
                user_config=deployment_info.deployment_config.user_config,
            )

        else:
            self._target_replicas = 0

        self._curr_status_info = DeploymentStatusInfo(DeploymentStatus.UPDATING)

        version_str = (
            deployment_info if deployment_info is None else deployment_info.version
        )
        logger.debug(f"Deploying new version of {self._name}: {version_str}")

        Set desirable state for a given deployment, identified by tag.

        Args:
            deployment_info (Optional[DeploymentInfo]): Contains deployment and
                replica config, if passed in as None, we're marking
                target deployment as shutting down.
        
Set desirable state for a given deployment, identified by tag.
Set desirable state for a given deployment identified by tag .
def _set_deployment_goal(self, deployment_info: Optional[DeploymentInfo]) -> None:
        if deployment_info is not None:
            self._target_info = deployment_info
            self._target_replicas = deployment_info.deployment_config.num_replicas
            self._target_version = DeploymentVersion(
                deployment_info.version,
                user_config=deployment_info.deployment_config.user_config,
            )
        else:
            self._target_replicas = 0
        self._curr_status_info = DeploymentStatusInfo(DeploymentStatus.UPDATING)
        version_str = (
            deployment_info if deployment_info is None else deployment_info.version
        )
        logger.debug(f"Deploying new version of {self._name}: {version_str}")
def _set_deployment_goal ( self , deployment_info : Optional [ DeploymentInfo ] ) -> None : if deployment_info is not None : self . _target_info = deployment_info self . _target_replicas = deployment_info . deployment_config . num_replicas self . _target_version = DeploymentVersion ( deployment_info . version , user_config = deployment_info . deployment_config . user_config , ) else : self . _target_replicas = 0 self . _curr_status_info = DeploymentStatusInfo ( DeploymentStatus . UPDATING ) version_str = ( deployment_info if deployment_info is None else deployment_info . version ) logger . debug ( f"Deploying new version of {self._name}: {version_str}" )
Set desirable state for a given deployment, identified by tag.
Set desirable state for a given deployment identified by tag .
"""
        Set desirable state for a given deployment, identified by tag.

        Args:
            deployment_info (Optional[DeploymentInfo]): Contains deployment and
                replica config, if passed in as None, we're marking
                target deployment as shutting down.
        """
self
deployment_info
Optional[DeploymentInfo]
Contains deployment and
replica config, if passed in as None, we're marking
target deployment as shutting down.
Contains deployment and replica config if passed in as None we ' re marking target deployment as shutting down .