diff --git a/module/webui/process_manager.py b/module/webui/process_manager.py index b3a2fbc4c..a3fe4d9ed 100644 --- a/module/webui/process_manager.py +++ b/module/webui/process_manager.py @@ -233,9 +233,6 @@ class ProcessManager: logger.info("Start alas complete") -from module.instance_watcher import InstanceWatcher - - class ProcessManager(ProcessManager): class DetailInstanceStatus: Alive = 1 @@ -246,10 +243,12 @@ class ProcessManager(ProcessManager): Error = 6 def start(self, *args, **kwargs): + from module.instance_watcher import InstanceWatcher super().start(*args, **kwargs) InstanceWatcher.get_instance().try_add_instance(self.config_name) def stop(self, *args, **kwargs): + from module.instance_watcher import InstanceWatcher InstanceWatcher.get_instance().remove_instance(self.config_name, remove_status_cache_file=kwargs.get("remove_status_cache_file", False)) kwargs.pop("remove_status_cache_file", None) super().stop(*args, **kwargs)