From ca761225023ca1b68fa9203128ca1c968be29c3a Mon Sep 17 00:00:00 2001 From: Tero Virtanen Date: Mon, 30 Sep 2024 15:01:02 +0300 Subject: [PATCH] chore: healthz check connections every 5 min --- atv/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atv/urls.py b/atv/urls.py index 82c1f9d..e70dada 100644 --- a/atv/urls.py +++ b/atv/urls.py @@ -88,7 +88,7 @@ def check_db_connection(): health_status["db"] = {"message": "OK"} except Exception as ex: health_status["db"] = {"error": str(ex)} - time.sleep(30) # Sleep for 0.5 minutes + time.sleep(300) # Sleep for 5 minutes def check_clamav_connection(): global health_status @@ -99,7 +99,7 @@ def check_clamav_connection(): health_status["clamav"] = {"message": "OK"} except Exception as ex: health_status["clamav"] = {"error": str(ex)} - time.sleep(30) # Sleep for 0.5 minutes + time.sleep(300) # Sleep for 5 minutes # Start the health check threads threading.Thread(target=check_db_connection, daemon=True).start()