safe_shutdown
- lib.utils.safe_shutdown(got_error: bool = False) None
Safely shut down the system.
This function terminates the queue manager and exits the program in a clean and orderly manner. An optional boolean parameter can be used to indicate whether an error occurred during the program’s execution.
- Parameters:
got_error (bool) –
Trueif this function is being called as the result of raised error. Default:False- Return type:
None
Example
>>> from lib.utils import safe_shutdown >>> safe_shutdown() >>> safe_shutdown(True)