File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed
templates/project_template Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1- 1.8.6-beta6
1+ 1.8.6-beta7
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ def __init__(
8787 user_pass = setting .REDISDB_USER_PASS
8888 if service_name is None :
8989 service_name = setting .REDISDB_SERVICE_NAME
90+ if kwargs is None :
91+ kwargs = setting .REDISDB_KWARGS
9092
9193 self ._is_redis_cluster = False
9294
@@ -180,7 +182,7 @@ def get_connect(self):
180182 self ._is_redis_cluster = False
181183 else :
182184 self ._redis = redis .StrictRedis .from_url (
183- self ._url , decode_responses = self ._decode_responses
185+ self ._url , decode_responses = self ._decode_responses , ** self . _kwargs
184186 )
185187 self ._is_redis_cluster = False
186188
Original file line number Diff line number Diff line change 3333REDISDB_IP_PORTS = os .getenv ("REDISDB_IP_PORTS" )
3434REDISDB_USER_PASS = os .getenv ("REDISDB_USER_PASS" )
3535REDISDB_DB = int (os .getenv ("REDISDB_DB" , 0 ))
36+ # 连接redis时携带的其他参数,如ssl=True
37+ REDISDB_KWARGS = dict ()
3638# 适用于redis哨兵模式
3739REDISDB_SERVICE_NAME = os .getenv ("REDISDB_SERVICE_NAME" )
3840
Original file line number Diff line number Diff line change 2222# REDISDB_IP_PORTS = "localhost:6379"
2323# REDISDB_USER_PASS = ""
2424# REDISDB_DB = 0
25+ # # 连接redis时携带的其他参数,如ssl=True
26+ # REDISDB_KWARGS = dict()
2527# # 适用于redis哨兵模式
2628# REDISDB_SERVICE_NAME = ""
2729#
You can’t perform that action at this time.
0 commit comments