From e91983adb48ebd2c424033c83fdb706d997d7903 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 3 Mar 2020 15:06:09 +0100 Subject: [PATCH] Watchdog check in_progress for audio/dns (#1555) --- supervisor/audio.py | 7 ------- supervisor/tasks.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/supervisor/audio.py b/supervisor/audio.py index a9dc9ed80..e7d84236d 100644 --- a/supervisor/audio.py +++ b/supervisor/audio.py @@ -188,13 +188,6 @@ class Audio(JsonConfig, CoreSysAttributes): """ return self.instance.is_running() - def is_fails(self) -> Awaitable[bool]: - """Return True if a Docker container is fails state. - - Return a coroutine. - """ - return self.instance.is_fails() - async def repair(self) -> None: """Repair CoreDNS plugin.""" if await self.instance.exists(): diff --git a/supervisor/tasks.py b/supervisor/tasks.py index e39d4afe9..bab7a8211 100644 --- a/supervisor/tasks.py +++ b/supervisor/tasks.py @@ -228,7 +228,7 @@ class Tasks(CoreSysAttributes): async def _watchdog_dns_docker(self): """Check running state of Docker and start if they is close.""" # if CoreDNS is active - if await self.sys_dns.is_running(): + if await self.sys_dns.is_running() or self.sys_dns.in_progress: return _LOGGER.warning("Watchdog found a problem with CoreDNS plugin!") @@ -244,7 +244,7 @@ class Tasks(CoreSysAttributes): async def _watchdog_audio_docker(self): """Check running state of Docker and start if they is close.""" # if PulseAudio plugin is active - if await self.sys_audio.is_running(): + if await self.sys_audio.is_running() or self.sys_audio.in_progress: return _LOGGER.warning("Watchdog found a problem with PulseAudio plugin!")