From fd59ace4f8a8a89d26cf5cf02503e855db462c72 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 2 Nov 2021 12:42:52 -0400 Subject: [PATCH] machine: use component_init for post initialization Signed-off-by: Eric Callahan --- moonraker/components/machine.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/moonraker/components/machine.py b/moonraker/components/machine.py index be7826d..46ae103 100644 --- a/moonraker/components/machine.py +++ b/moonraker/components/machine.py @@ -82,10 +82,7 @@ class Machine: self.server.register_remote_method( "reboot_machine", self.reboot_machine) - # Retreive list of services - event_loop = self.server.get_event_loop() self.init_evt = asyncio.Event() - event_loop.register_callback(self._initialize) def _update_log_rollover(self, log: bool = False) -> None: sys_info_msg = "\nSystem Info:" @@ -104,7 +101,7 @@ class Machine: except asyncio.TimeoutError: pass - async def _initialize(self): + async def component_init(self): if not self.inside_container: await self._check_virt_status() await self._find_active_services()