Replaced redis with Valkey (#3164)

### What problem does this PR solve?

Replaced redis with Valkey. Close #3070

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [x] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
This commit is contained in:
Zhichang Yu 2024-11-02 20:05:12 +08:00 committed by GitHub
parent 44ad9a6cd7
commit 37d71dfa90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 593 additions and 574 deletions

View File

@ -75,7 +75,7 @@ services:
restart: always
redis:
image: redis:7.2.4
image: valkey/valkey:8
container_name: ragflow-redis
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
ports:

1159
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -78,7 +78,7 @@ pywencai = "0.12.2"
qianfan = "0.4.6"
ranx = "0.3.20"
readability-lxml = "0.8.1"
redis = "5.0.3"
valkey = "6.0.2"
requests = "2.32.2"
replicate = "0.31.0"
roman-numbers = "1.0.2"

View File

@ -1,6 +1,6 @@
import json
import redis
import valkey as redis
import logging
from rag import settings
from rag.utils import singleton
@ -40,7 +40,7 @@ class RedisDB:
db=int(self.config.get("db", 1)),
password=self.config.get("password"),
decode_responses=True)
except Exception as e:
except Exception:
logging.warning("Redis can't be connected.")
return self.REDIS