mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 02:56:31 +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."""
|
"""Setup supervisor orchestration."""
|
||||||
self.state = CoreStates.STARTUP
|
self.state = CoreStates.STARTUP
|
||||||
|
|
||||||
# load last available data
|
|
||||||
await self.sys_updater.load()
|
|
||||||
|
|
||||||
# Load DBus
|
# Load DBus
|
||||||
await self.sys_dbus.load()
|
await self.sys_dbus.load()
|
||||||
|
|
||||||
@ -46,6 +43,9 @@ class Core(CoreSysAttributes):
|
|||||||
# Load Plugins container
|
# Load Plugins container
|
||||||
await self.sys_plugins.load()
|
await self.sys_plugins.load()
|
||||||
|
|
||||||
|
# load last available data
|
||||||
|
await self.sys_updater.load()
|
||||||
|
|
||||||
# Load Home Assistant
|
# Load Home Assistant
|
||||||
await self.sys_homeassistant.load()
|
await self.sys_homeassistant.load()
|
||||||
|
|
||||||
|
@ -252,15 +252,13 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
|||||||
_LOGGER.info("Setup HomeAssistant landingpage")
|
_LOGGER.info("Setup HomeAssistant landingpage")
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
await self.instance.install(
|
await self.instance.install("landingpage", image=self.image)
|
||||||
"landingpage", image=self.sys_updater.image_homeassistant
|
|
||||||
)
|
|
||||||
except DockerAPIError:
|
except DockerAPIError:
|
||||||
_LOGGER.warning("Fails install landingpage, retry after 30sec")
|
_LOGGER.warning("Fails install landingpage, retry after 30sec")
|
||||||
await asyncio.sleep(30)
|
await asyncio.sleep(30)
|
||||||
else:
|
else:
|
||||||
self.version = self.instance.version
|
self.version = self.instance.version
|
||||||
self.image = self.sys_updater.image_homeassistant
|
self.image = self.instance.image
|
||||||
self.save_data()
|
self.save_data()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user