mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix redis no such key (#1647)
### What problem does this PR solve? fix Redis no such key #1614 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Signed-off-by: seaver <zhudan187@qq.com> Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@ -44,9 +44,14 @@ class RedisDB:
|
||||
logging.warning("Redis can't be connected.")
|
||||
return self.REDIS
|
||||
|
||||
def health(self, queue_name):
|
||||
def health(self):
|
||||
|
||||
self.REDIS.ping()
|
||||
return self.REDIS.xinfo_groups(queue_name)[0]
|
||||
a, b = 'xx', 'yy'
|
||||
self.REDIS.set(a, b, 3)
|
||||
|
||||
if self.REDIS.get(a) == b:
|
||||
return True
|
||||
|
||||
def is_alive(self):
|
||||
return self.REDIS is not None
|
||||
|
||||
Reference in New Issue
Block a user