From af88f9de6e60ba3827e7b0f7ec5ec6b9e5bb7183 Mon Sep 17 00:00:00 2001 From: Lu Baumann Date: Tue, 2 Jan 2024 12:07:14 +0000 Subject: [PATCH] fixed behavior pinging self on container not found --- docker-healthcheck.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-healthcheck.py b/docker-healthcheck.py index d421503..b046567 100644 --- a/docker-healthcheck.py +++ b/docker-healthcheck.py @@ -36,8 +36,7 @@ def main() -> None: f"Container has status '{container_status}' which is not one of 'healthy' or 'running'" ) except docker.errors.NotFound: - if "self" in checks: - requests.post(checks["self"] + "/fail", f"Container '{container_id}' not found.") + requests.post(checks[container_id] + "/fail", f"Container '{container_id}' not found.") if __name__ == "__main__":