mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-16 05:25:58 +08:00
refine redis connection (#599)
### What problem does this PR solve? #591 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
8c07992b6c
commit
8acc01a227
@ -47,6 +47,7 @@ class Excel(ExcelParser):
|
|||||||
cell.value for i,
|
cell.value for i,
|
||||||
cell in enumerate(
|
cell in enumerate(
|
||||||
rows[0]) if i not in missed]
|
rows[0]) if i not in missed]
|
||||||
|
if not headers:continue
|
||||||
data = []
|
data = []
|
||||||
for i, r in enumerate(rows[1:]):
|
for i, r in enumerate(rows[1:]):
|
||||||
rn += 1
|
rn += 1
|
||||||
|
@ -14,10 +14,10 @@ class RedisDB:
|
|||||||
|
|
||||||
def __open__(self):
|
def __open__(self):
|
||||||
try:
|
try:
|
||||||
self.REDIS = redis.Redis(host=self.config.get("host", "redis").split(":")[0],
|
self.REDIS = redis.StrictRedis(host=self.config["host"].split(":")[0],
|
||||||
port=int(self.config.get("host", ":6379").split(":")[1]),
|
port=int(self.config.get("host", ":6379").split(":")[1]),
|
||||||
db=int(self.config.get("db", 1)),
|
db=int(self.config.get("db", 1)),
|
||||||
password=self.config.get("password"))
|
password=self.config["password"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.warning("Redis can't be connected.")
|
logging.warning("Redis can't be connected.")
|
||||||
return self.REDIS
|
return self.REDIS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user