mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
Improve the flow with fallback if there is a network issue (#1670)
This commit is contained in:
parent
ffa91e150d
commit
ebfaaeaa6b
@ -34,9 +34,6 @@ class Core(CoreSysAttributes):
|
||||
"""Setup supervisor orchestration."""
|
||||
self.state = CoreStates.STARTUP
|
||||
|
||||
# load last available data
|
||||
await self.sys_updater.load()
|
||||
|
||||
# Load DBus
|
||||
await self.sys_dbus.load()
|
||||
|
||||
@ -46,6 +43,9 @@ class Core(CoreSysAttributes):
|
||||
# Load Plugins container
|
||||
await self.sys_plugins.load()
|
||||
|
||||
# load last available data
|
||||
await self.sys_updater.load()
|
||||
|
||||
# Load Home Assistant
|
||||
await self.sys_homeassistant.load()
|
||||
|
||||
|
@ -252,15 +252,13 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
||||
_LOGGER.info("Setup HomeAssistant landingpage")
|
||||
while True:
|
||||
try:
|
||||
await self.instance.install(
|
||||
"landingpage", image=self.sys_updater.image_homeassistant
|
||||
)
|
||||
await self.instance.install("landingpage", image=self.image)
|
||||
except DockerAPIError:
|
||||
_LOGGER.warning("Fails install landingpage, retry after 30sec")
|
||||
await asyncio.sleep(30)
|
||||
else:
|
||||
self.version = self.instance.version
|
||||
self.image = self.sys_updater.image_homeassistant
|
||||
self.image = self.instance.image
|
||||
self.save_data()
|
||||
break
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user