mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 22:56:31 +00:00
Run API watchdog only if core is running (#2961)
* Run API watchdog only if core is running * negate * fix comment
This commit is contained in:
parent
de8a241e72
commit
3b1ad5c0cd
@ -204,9 +204,9 @@ class Tasks(CoreSysAttributes):
|
||||
Try 2 times to call API before we restart Home-Assistant. Maybe we had
|
||||
a delay in our system.
|
||||
"""
|
||||
# If Home-Assistant is active
|
||||
# Home-Assistant is active/running
|
||||
if (
|
||||
await self.sys_homeassistant.core.is_failed()
|
||||
not await self.sys_homeassistant.core.is_running()
|
||||
or not self.sys_homeassistant.watchdog
|
||||
or self.sys_homeassistant.error_state
|
||||
):
|
||||
@ -215,7 +215,7 @@ class Tasks(CoreSysAttributes):
|
||||
# Init cache data
|
||||
retry_scan = self._cache.get(HASS_WATCHDOG_API, 0)
|
||||
|
||||
# If Home-Assistant API is up
|
||||
# Home-Assistant API is up
|
||||
if (
|
||||
self.sys_homeassistant.core.in_progress
|
||||
or await self.sys_homeassistant.api.check_api_state()
|
||||
|
Loading…
x
Reference in New Issue
Block a user