mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Simplify watchdog container rules (#3820)
This commit is contained in:
parent
97af1fc66e
commit
7b63544474
@ -963,10 +963,11 @@ class Addon(AddonModel):
|
|||||||
|
|
||||||
async def watchdog_container(self, event: DockerContainerStateEvent) -> None:
|
async def watchdog_container(self, event: DockerContainerStateEvent) -> None:
|
||||||
"""Process state changes in addon container and restart if necessary."""
|
"""Process state changes in addon container and restart if necessary."""
|
||||||
if (
|
if event.name != self.instance.name:
|
||||||
not (event.name == self.instance.name and self.watchdog)
|
return
|
||||||
or self._manual_stop
|
|
||||||
):
|
# Skip watchdog if not enabled or manual stopped
|
||||||
|
if not self.watchdog or self._manual_stop:
|
||||||
return
|
return
|
||||||
|
|
||||||
if event.state in [
|
if event.state in [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user