From 55ce3d58f5dd285d10910442eaf895e90134b494 Mon Sep 17 00:00:00 2001 From: Petya Slavova Date: Thu, 27 Mar 2025 14:56:01 +0200 Subject: [PATCH] Adding info for sentinel handling failover when Redis client is acquired with master_for() method. --- redis/asyncio/sentinel.py | 2 ++ redis/sentinel.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/redis/asyncio/sentinel.py b/redis/asyncio/sentinel.py index 0389539fcf..fae6875d82 100644 --- a/redis/asyncio/sentinel.py +++ b/redis/asyncio/sentinel.py @@ -326,6 +326,8 @@ def master_for( ): """ Returns a redis client instance for the ``service_name`` master. + Sentinel client will detect failover and reconnect Redis clients + automatically. A :py:class:`~redis.sentinel.SentinelConnectionPool` class is used to retrieve the master's address before establishing a new diff --git a/redis/sentinel.py b/redis/sentinel.py index 521ac24142..02aa244ede 100644 --- a/redis/sentinel.py +++ b/redis/sentinel.py @@ -349,6 +349,8 @@ def master_for( ): """ Returns a redis client instance for the ``service_name`` master. + Sentinel client will detect failover and reconnect Redis clients + automatically. A :py:class:`~redis.sentinel.SentinelConnectionPool` class is used to retrieve the master's address before establishing a new