shutdown#

abstract OslServer.shutdown(force: bool = False) None#

Shutdown the optiSLang server.

Stop listening for incoming connections, discard pending requests, and shut down the server. Batch mode exclusive: Continue project run until execution finished. Terminate optiSLang.

Parameters:
forcebool, optional

Determines whether to force shutdown the local optiSLang server. Has no effect when the connection is established to the remote optiSLang server. In all cases, it is tried to shutdown the optiSLang server process in a proper way. However, if the force parameter is True, after a while, the process is forced to terminate and no exception is raised. Defaults to False.

Raises:
OslCommunicationError

Raised when the parameter force is False and an error occurs while communicating with server.

OslCommandError

Raised when the parameter force is False and the command or query fails.

TimeoutError

Raised when the parameter force is False and the timeout float value expires.