update_manager: reorder update instances

Instantiate the moonraker instance first, then Klipper.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-03-27 06:08:02 -04:00
parent c8042a5700
commit 93b62236de
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 10 additions and 8 deletions

View File

@ -90,6 +90,14 @@ class UpdateManager:
KLIPPER_DEFAULT_PATH).result()
kenv_path = db.get_item("moonraker", "update_manager.klipper_exec",
KLIPPER_DEFAULT_EXEC).result()
self.updaters['moonraker'] = get_deploy_class(MOONRAKER_PATH)(
self.app_config[f"update_manager moonraker"], self.cmd_helper,
{
'channel': self.channel,
'path': MOONRAKER_PATH,
'executable': sys.executable
}
)
if (
os.path.exists(kpath) and
os.path.exists(kenv_path)
@ -100,17 +108,11 @@ class UpdateManager:
'channel': self.channel,
'path': kpath,
'executable': kenv_path
})
}
)
else:
self.updaters['klipper'] = BaseDeploy(
self.app_config[f"update_manager klipper"], self.cmd_helper)
self.updaters['moonraker'] = get_deploy_class(MOONRAKER_PATH)(
self.app_config[f"update_manager moonraker"], self.cmd_helper,
{
'channel': self.channel,
'path': MOONRAKER_PATH,
'executable': sys.executable
})
# TODO: The below check may be removed when invalid config options
# raise a config error.