Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba0165d

Browse files
committed
1.8.6-beta7
1 parent 2d80fb2 commit ba0165d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

feapder/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.6-beta6
1+
1.8.6-beta7

feapder/db/redisdb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

feapder/setting.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
REDISDB_IP_PORTS = os.getenv("REDISDB_IP_PORTS")
3434
REDISDB_USER_PASS = os.getenv("REDISDB_USER_PASS")
3535
REDISDB_DB = int(os.getenv("REDISDB_DB", 0))
36+
# 连接redis时携带的其他参数,如ssl=True
37+
REDISDB_KWARGS = dict()
3638
# 适用于redis哨兵模式
3739
REDISDB_SERVICE_NAME = os.getenv("REDISDB_SERVICE_NAME")
3840

feapder/templates/project_template/setting.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
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
#

0 commit comments

Comments
 (0)