summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdealiJK <abdealikothari@gmail.com>2021-10-26 00:45:25 +0530
committerGitHub <noreply@github.com>2021-10-25 22:15:25 +0300
commit8924504f9875d3c80733504d6f6923f5611ebf17 (patch)
tree06f7ba7165cbbaff16525c2ddcebef82705391dd
parentddd1496782cc8eb15fca6c9059b2b08a03efe366 (diff)
downloadredis-py-8924504f9875d3c80733504d6f6923f5611ebf17.tar.gz
sentinel: Add SentinelManagedSSLConnection (#1419)
Create a simple class which takes in both: - SentinelManaged - SSLConnection in cases where the sentinel is being used with a TLS enabled redis setup.
-rw-r--r--redis/sentinel.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/redis/sentinel.py b/redis/sentinel.py
index 6456b8e..740d92f 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -3,7 +3,7 @@ import weakref
from redis.client import Redis
from redis.commands import SentinelCommands
-from redis.connection import ConnectionPool, Connection
+from redis.connection import ConnectionPool, Connection, SSLConnection
from redis.exceptions import (ConnectionError, ResponseError, ReadOnlyError,
TimeoutError)
from redis.utils import str_if_bytes
@@ -66,6 +66,10 @@ class SentinelManagedConnection(Connection):
raise
+class SentinelManagedSSLConnection(SentinelManagedConnection, SSLConnection):
+ pass
+
+
class SentinelConnectionPool(ConnectionPool):
"""
Sentinel backed connection pool.