From c609ee62691a45b28316dba9045b0b197e92269b Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 30 Mar 2023 21:57:01 +0100 Subject: [PATCH] feat(chalice): changed health-check for EE --- ee/api/chalicelib/core/health.py | 4 ++-- ee/api/env.default | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index 31087a1e1..1daf00c2b 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -139,6 +139,8 @@ def get_health(): "clickhouse": __check_database_ch }, "ingestionPipeline": { + **({"redis": __check_redis} if config("REDIS_STRING", default=None) + and len(config("REDIS_STRING")) > 0 else {}), # "kafka": __check_kafka "kafka": __always_healthy }, @@ -161,8 +163,6 @@ def get_health(): "storage": __check_be_service("storage") } } - if config("REDIS_STRING", default=None) is not None and len(config("REDIS_STRING")) > 0: - health_map["ingestionPipeline"]["redis"] = __check_redis for parent_key in health_map.keys(): for element_key in health_map[parent_key]: health_map[parent_key][element_key] = health_map[parent_key][element_key]() diff --git a/ee/api/env.default b/ee/api/env.default index ff82cb2af..1947e9847 100644 --- a/ee/api/env.default +++ b/ee/api/env.default @@ -72,6 +72,5 @@ DEVTOOLS_MOB_PATTERN=%(sessionId)s/devtools.mob PRESIGNED_URL_EXPIRATION=3600 ASSIST_JWT_EXPIRATION=144000 ASSIST_JWT_SECRET= -REDIS_STRING=redis://redis-master.db.svc.cluster.local:6379 KAFKA_SERVERS=kafka.db.svc.cluster.local:9092 KAFKA_USE_SSL=false \ No newline at end of file