mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 16:09:25 +08:00
fix: try to add alas instance itself to watcher when start
This commit is contained in:
@@ -231,3 +231,16 @@ class ProcessManager:
|
||||
except:
|
||||
pass
|
||||
logger.info("Start alas complete")
|
||||
|
||||
|
||||
from module.instance_watcher import InstanceWatcher
|
||||
|
||||
|
||||
class ProcessManager(ProcessManager):
|
||||
def start(self, *args, **kwargs):
|
||||
super().start(*args, **kwargs)
|
||||
InstanceWatcher.get_instance().try_add_instance(self.config_name)
|
||||
|
||||
def stop(self, *args, **kwargs):
|
||||
InstanceWatcher.get_instance().remove_instance(self.config_name)
|
||||
super().stop(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user