From 7d744f5cf45b6caa287fc96a3f79b8af5d477747 Mon Sep 17 00:00:00 2001 From: benya Date: Sat, 7 Feb 2026 23:45:14 +0300 Subject: [PATCH] Suppress watchdog notifications on startup --- services/docker.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/docker.py b/services/docker.py index 1b88720..2f8f1be 100644 --- a/services/docker.py +++ b/services/docker.py @@ -101,6 +101,17 @@ async def docker_cmd(args: list[str], timeout: int = 20): async def docker_watchdog(container_map, notify, bot, chat_id): last = {} while True: + if not last: + for alias, real in container_map.items(): + rc, state = await docker_cmd( + ["inspect", "-f", "{{.State.Status}}", real], + timeout=10 + ) + if rc != 0: + state = "error" + last[alias] = state.strip() + await asyncio.sleep(120) + continue for alias, real in container_map.items(): rc, state = await docker_cmd( ["inspect", "-f", "{{.State.Status}}", real],