From 7d21e0c6d2cc2bb1cded0ceb607a8436fa3f280a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 11 Jan 2023 02:05:42 +0100 Subject: [PATCH] Add timeout to heath check --- discord_rss_bot/healthcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord_rss_bot/healthcheck.py b/discord_rss_bot/healthcheck.py index 8f752f6..ddb315d 100644 --- a/discord_rss_bot/healthcheck.py +++ b/discord_rss_bot/healthcheck.py @@ -10,7 +10,7 @@ def healthcheck() -> None: sys.exit(1): unhealthy - the container is not working correctly.""" # TODO: We should check more than just that the website is up. try: - r: requests.Response = requests.get("http://localhost:5000") + r: requests.Response = requests.get(url="http://localhost:5000", timeout=5) if r.ok: sys.exit(0) except requests.exceptions.RequestException as e: