From dc653737e03a651595fedca4b90112c5ea394f1e Mon Sep 17 00:00:00 2001 From: febux Date: Sun, 6 Sep 2026 17:56:36 +0300 Subject: [PATCH] Redis maint notif was disabled. ONLY FOR REDIS CLOUD --- src/contract_check/core/redis_client.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/contract_check/core/redis_client.py b/src/contract_check/core/redis_client.py index c5376b2..571c15f 100644 --- a/src/contract_check/core/redis_client.py +++ b/src/contract_check/core/redis_client.py @@ -13,7 +13,17 @@ def get_redis_client(redis_url: str) -> Any: Callers own the connection lifecycle. The api creates one client at startup and stores it in app.state.redis. + + Maintenance notifications are disabled: they are a Redis Cloud feature and + self-hosted/Valkey servers reject ``CLIENT MAINT_NOTIFICATIONS`` with an + ``unknown subcommand`` error, spamming debug logs. """ from redis.asyncio import Redis as AsyncRedis + from redis.maint_notifications import MaintNotificationsConfig - return AsyncRedis.from_url(redis_url, decode_responses=True) + maint_config = MaintNotificationsConfig(enabled=False) + return AsyncRedis.from_url( + redis_url, + decode_responses=True, + maint_notifications_config=maint_config, + )