modelon/impact/client/operations.py
def wait(self, timeout=None, status=Status.DONE):
        """Waits until the operation achieves the set status.
        Returns the operation class instance if the set status is achieved.

        Parameters:

            timeout --
                Time to wait in seconds for achieving the status.This argument is
                not accounted for the CachedModelExecutableOperation class as the
                model has a successfully compiled status(Status.DONE) in this class.

            status --
                Operation status to be achieved. The only possible status for the
                CachedModelExecutableOperation class is Status.DONE as cached FMU
                is only avaiable for a successfully compiled model.

        Returns:

            Operation class instance if the set status is achieved.

        Raises:

            OperationTimeOutError if operation status is not set as Status.DONE.

        Example::

           model.compile(compile_options).wait()
        """

        if self.status() != status:
            raise exceptions.OperationTimeOutError(
                f"The operation '{self.name}' has the status '{self.status().name}'"
                f", it will never get the status '{status.name}'!"
            )

        logger.info("Cached FMU found! Using the cached FMU!")
        return self.data()
Waits until the operation achieves the set status.
        Returns the operation class instance if the set status is achieved.

        Parameters:

            timeout --
                Time to wait in seconds for achieving the status.This argument is
                not accounted for the CachedModelExecutableOperation class as the
                model has a successfully compiled status(Status.DONE) in this class.

            status --
                Operation status to be achieved. The only possible status for the
                CachedModelExecutableOperation class is Status.DONE as cached FMU
                is only avaiable for a successfully compiled model.

        Returns:

            Operation class instance if the set status is achieved.

        Raises:

            OperationTimeOutError if operation status is not set as Status.DONE.

        Example::

           model.compile(compile_options).wait()
        
Waits until the operation achieves the set status.
Returns the operation class instance if the set status is achieved.



timeout
Time to wait in seconds for achieving the status.This argument is
not accounted for the CachedModelExecutableOperation class as the
model has a successfully compiled status(Status.DONE) in this class.

status
Operation status to be achieved. The only possible status for the
CachedModelExecutableOperation class is Status.DONE as cached FMU
is only avaiable for a successfully compiled model.



Operation class instance if the set status is achieved.



OperationTimeOutError if operation status is not set as Status.DONE.




Waits until the operation achieves the set status . Returns the operation class instance if the set status is achieved . timeout Time to wait in seconds for achieving the status . This argument is not accounted for the CachedModelExecutableOperation class as the model has a successfully compiled status ( Status . DONE ) in this class . status Operation status to be achieved . The only possible status for the CachedModelExecutableOperation class is Status . DONE as cached FMU is only avaiable for a successfully compiled model . Operation class instance if the set status is achieved . OperationTimeOutError if operation status is not set as Status . DONE .
def wait(self, timeout=None, status=Status.DONE):
        if self.status() != status:
            raise exceptions.OperationTimeOutError(
                f"The operation '{self.name}' has the status '{self.status().name}'"
                f", it will never get the status '{status.name}'!"
            )
        logger.info("Cached FMU found! Using the cached FMU!")
        return self.data()
def wait ( self , timeout = None , status = Status . DONE ) : if self . status ( ) != status : raise exceptions . OperationTimeOutError ( f"The operation '{self.name}' has the status '{self.status().name}'" f", it will never get the status '{status.name}'!" ) logger . info ( "Cached FMU found! Using the cached FMU!" ) return self . data ( )
Waits until the operation achieves the set status.
Waits until the operation achieves the set status .
"""Waits until the operation achieves the set status.
        Returns the operation class instance if the set status is achieved.

        Parameters:

            timeout --
                Time to wait in seconds for achieving the status.This argument is
                not accounted for the CachedModelExecutableOperation class as the
                model has a successfully compiled status(Status.DONE) in this class.

            status --
                Operation status to be achieved. The only possible status for the
                CachedModelExecutableOperation class is Status.DONE as cached FMU
                is only avaiable for a successfully compiled model.

        Returns:

            Operation class instance if the set status is achieved.

        Raises:

            OperationTimeOutError if operation status is not set as Status.DONE.

        Example::

           model.compile(compile_options).wait()
        """
self
timeout
status