Commit 93418732 authored by Julien Enselme's avatar Julien Enselme
parent aa9a1878
from redis.connection import UnixDomainSocketConnection, Connection
from redis.connection import UnixDomainSocketConnection, Connection, SSLConnection
class CacheConnectionPool(object):
......@@ -25,6 +25,7 @@ class CacheConnectionPool(object):
host='127.0.0.1',
port=6379,
db=1,
ssl=False,
password=None,
parser_class=None,
unix_socket_path=None,
......@@ -42,7 +43,9 @@ class CacheConnectionPool(object):
if pool is None:
connection_class = (
unix_socket_path and UnixDomainSocketConnection or Connection
unix_socket_path and UnixDomainSocketConnection
or ssl and SSLConnection
or Connection
)
kwargs = {
......
......@@ -114,7 +114,7 @@ def parse_connection_kwargs(server, db=None, **kwargs):
pass
if url.scheme == 'rediss':
url_options['connection_class'] = SSLConnection
url_options['ssl'] = True
# last shot at the db value
url_options['db'] = int(url_options.get('db', db or 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment