Skip to content

Commit

Permalink
redis没有密码配置的情况 (#2293)
Browse files Browse the repository at this point in the history
* 修复mongo执行sql语句超过4000工单失败的问题

* 处理lint问题

* 修复申请权限时,mysql无法展示table选项的问题

* 兼容一下redis实例未配置密码的情况

* 修改下写法

---------

Co-authored-by: Leo Q <LeoQuote@users.noreply.github.com>
  • Loading branch information
woshiyanghai and LeoQuote authored Sep 13, 2023
1 parent 6ae3355 commit 9915cd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/engines/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_connection(self, db_name=None):
return redis.cluster.RedisCluster(
host=self.host,
port=self.port,
password=self.password,
password=self.password or None,
encoding_errors="ignore",
decode_responses=True,
socket_connect_timeout=10,
Expand All @@ -40,7 +40,7 @@ def get_connection(self, db_name=None):
host=self.host,
port=self.port,
db=db_name,
password=self.password,
password=self.password or None,
encoding_errors="ignore",
decode_responses=True,
socket_connect_timeout=10,
Expand Down

0 comments on commit 9915cd6

Please sign in to comment.