python/ray/serve/deployment_state.py
def update(self) -> bool:
        """Attempts to reconcile this deployment to match its goal state.

        This is an asynchronous call; it's expected to be called repeatedly.

        Also updates the internal DeploymentStatusInfo based on the current
        state of the system.

        Returns true if this deployment was successfully deleted.
        """
        try:
            # Add or remove DeploymentReplica instances in self._replicas.
            # This should be the only place we adjust total number of replicas
            # we manage.
            running_replicas_changed = self._scale_deployment_replicas()

            # Check the state of existing replicas and transition if necessary.
            running_replicas_changed |= self._check_and_update_replicas()

            if running_replicas_changed:
                self._notify_running_replicas_changed()

            deleted = self._check_curr_status()
        except Exception:
            self._curr_status_info = DeploymentStatusInfo(
                status=DeploymentStatus.UNHEALTHY,
                message="Failed to update deployment:" f"\n{traceback.format_exc()}",
            )
            deleted = False

        return deleted
Attempts to reconcile this deployment to match its goal state.

        This is an asynchronous call; it's expected to be called repeatedly.

        Also updates the internal DeploymentStatusInfo based on the current
        state of the system.

        Returns true if this deployment was successfully deleted.
        
Attempts to reconcile this deployment to match its goal state.
This is an asynchronous call; it's expected to be called repeatedly.

Also updates the internal DeploymentStatusInfo based on the current
state of the system.

Returns true if this deployment was successfully deleted.
Attempts to reconcile this deployment to match its goal state . This is an asynchronous call ; it ' s expected to be called repeatedly . Also updates the internal DeploymentStatusInfo based on the current state of the system . Returns true if this deployment was successfully deleted .
def update(self) -> bool:
        try:
            running_replicas_changed = self._scale_deployment_replicas()
            running_replicas_changed |= self._check_and_update_replicas()
            if running_replicas_changed:
                self._notify_running_replicas_changed()
            deleted = self._check_curr_status()
        except Exception:
            self._curr_status_info = DeploymentStatusInfo(
                status=DeploymentStatus.UNHEALTHY,
                message="Failed to update deployment:" f"\n{traceback.format_exc()}",
            )
            deleted = False
        return deleted
def update ( self ) -> bool : try : running_replicas_changed = self . _scale_deployment_replicas ( ) running_replicas_changed |= self . _check_and_update_replicas ( ) if running_replicas_changed : self . _notify_running_replicas_changed ( ) deleted = self . _check_curr_status ( ) except Exception : self . _curr_status_info = DeploymentStatusInfo ( status = DeploymentStatus . UNHEALTHY , message = "Failed to update deployment:" f"\n{traceback.format_exc()}" , ) deleted = False return deleted
Attempts to reconcile this deployment to match its goal state.
Attempts to reconcile this deployment to match its goal state .
"""Attempts to reconcile this deployment to match its goal state.

        This is an asynchronous call; it's expected to be called repeatedly.

        Also updates the internal DeploymentStatusInfo based on the current
        state of the system.

        Returns true if this deployment was successfully deleted.
        """ # Add or remove DeploymentReplica instances in self._replicas. # This should be the only place we adjust total number of replicas # we manage. # Check the state of existing replicas and transition if necessary.
self