machine: use component_init for post initialization

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-11-02 12:42:52 -04:00 committed by Eric Callahan
parent 15d99be9f0
commit fd59ace4f8
1 changed files with 1 additions and 4 deletions

View File

@ -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()