sentinel: Add SentinelManagedSSLConnection
Create a simple class which takes in both:
- SentinelManaged
- SSLConnection
in cases where the sentinel is being used with a TLS enabled redis
setup.
@@ -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.
