Replaced redis with Valkey (#3164)
Browse files### 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):
- docker/docker-compose-base.yml +1 -1
- poetry.lock +0 -0
- pyproject.toml +1 -1
- rag/utils/redis_conn.py +2 -2
docker/docker-compose-base.yml
CHANGED
@@ -75,7 +75,7 @@ services:
|
|
75 |
restart: always
|
76 |
|
77 |
redis:
|
78 |
-
image:
|
79 |
container_name: ragflow-redis
|
80 |
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
|
81 |
ports:
|
|
|
75 |
restart: always
|
76 |
|
77 |
redis:
|
78 |
+
image: valkey/valkey:8
|
79 |
container_name: ragflow-redis
|
80 |
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
|
81 |
ports:
|
poetry.lock
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
pyproject.toml
CHANGED
@@ -78,7 +78,7 @@ pywencai = "0.12.2"
|
|
78 |
qianfan = "0.4.6"
|
79 |
ranx = "0.3.20"
|
80 |
readability-lxml = "0.8.1"
|
81 |
-
|
82 |
requests = "2.32.2"
|
83 |
replicate = "0.31.0"
|
84 |
roman-numbers = "1.0.2"
|
|
|
78 |
qianfan = "0.4.6"
|
79 |
ranx = "0.3.20"
|
80 |
readability-lxml = "0.8.1"
|
81 |
+
valkey = "6.0.2"
|
82 |
requests = "2.32.2"
|
83 |
replicate = "0.31.0"
|
84 |
roman-numbers = "1.0.2"
|
rag/utils/redis_conn.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import json
|
2 |
|
3 |
-
import redis
|
4 |
import logging
|
5 |
from rag import settings
|
6 |
from rag.utils import singleton
|
@@ -40,7 +40,7 @@ class RedisDB:
|
|
40 |
db=int(self.config.get("db", 1)),
|
41 |
password=self.config.get("password"),
|
42 |
decode_responses=True)
|
43 |
-
except Exception
|
44 |
logging.warning("Redis can't be connected.")
|
45 |
return self.REDIS
|
46 |
|
|
|
1 |
import json
|
2 |
|
3 |
+
import valkey as redis
|
4 |
import logging
|
5 |
from rag import settings
|
6 |
from rag.utils import singleton
|
|
|
40 |
db=int(self.config.get("db", 1)),
|
41 |
password=self.config.get("password"),
|
42 |
decode_responses=True)
|
43 |
+
except Exception:
|
44 |
logging.warning("Redis can't be connected.")
|
45 |
return self.REDIS
|
46 |
|