def check_lifecycle(self):
        """
        Tests if the state of the component must be updated, based on its own
        state and on the state of its dependencies
        """
        with self._lock:
            # Validation flags
            was_valid = self.state == StoredInstance.VALID
            can_validate = self.state not in (
                StoredInstance.VALIDATING,
                StoredInstance.VALID,
            )

            # Test the validity of all handlers
            handlers_valid = self.__safe_handlers_callback(
                "is_valid", break_on_false=True
            )

            if was_valid and not handlers_valid:
                # A dependency is missing
                self.invalidate(True)
            elif (
                can_validate and handlers_valid and self._ipopo_service.running
            ):
                # We're all good
                self.validate(True)
def check_lifecycle ( self ) : with self . _lock : was_valid = self . state == StoredInstance . VALID can_validate = self . state not in ( StoredInstance . VALIDATING , StoredInstance . VALID , ) handlers_valid = self . __safe_handlers_callback ( "is_valid" , break_on_false = True ) if was_valid and not handlers_valid : self . invalidate ( True ) elif ( can_validate and handlers_valid and self . _ipopo_service . running ) : self . validate ( True )
Tests if the state of the component must be updated, based on its own
        state and on the state of its dependencies