python/ray/serve/deployment_state.py
def check_stopped(self) -> bool:
        """Check if the replica has finished stopping."""
        if self._actor.check_stopped():
            # Clean up any associated resources (e.g., placement group).
            self._actor.cleanup()
            return True

        timeout_passed = time.time() > self._shutdown_deadline
        if timeout_passed:
            # Graceful period passed, kill it forcefully.
            # This will be called repeatedly until the replica shuts down.
            logger.debug(
                f"Replica {self.replica_tag} did not shut down after grace "
                "period, force-killing it. "
            )

            self._actor.force_stop()
        return False
Check if the replica has finished stopping.
Check if the replica has finished stopping.
Check if the replica has finished stopping .
def check_stopped(self) -> bool:
        if self._actor.check_stopped():
            self._actor.cleanup()
            return True
        timeout_passed = time.time() > self._shutdown_deadline
        if timeout_passed:
            logger.debug(
                f"Replica {self.replica_tag} did not shut down after grace "
                "period, force-killing it. "
            )
            self._actor.force_stop()
        return False
def check_stopped ( self ) -> bool : if self . _actor . check_stopped ( ) : self . _actor . cleanup ( ) return True timeout_passed = time . time ( ) > self . _shutdown_deadline if timeout_passed : logger . debug ( f"Replica {self.replica_tag} did not shut down after grace " "period, force-killing it. " ) self . _actor . force_stop ( ) return False
Check if the replica has finished stopping.
Check if the replica has finished stopping .
"""Check if the replica has finished stopping.""" # Clean up any associated resources (e.g., placement group). # Graceful period passed, kill it forcefully. # This will be called repeatedly until the replica shuts down.
self