Changed default URI for Redis
This commit is contained in:
parent
a54ef39e53
commit
cda570eb37
6
classes/cache/holo_cache_redis.py
vendored
6
classes/cache/holo_cache_redis.py
vendored
@ -1,6 +1,6 @@
|
||||
import logging
|
||||
from logging import Logger
|
||||
from typing import Dict, Any, List
|
||||
from typing import Dict, Any
|
||||
|
||||
from redis import Redis
|
||||
|
||||
@ -25,9 +25,7 @@ class HoloCacheRedis(HoloCache):
|
||||
"Cache configuration is invalid. Please check if all keys are set (engine: memcached)"
|
||||
)
|
||||
|
||||
uri_split: List[str] = engine_config["uri"].split(":")
|
||||
|
||||
return cls(Redis(host=uri_split[0], port=int(uri_split[1])))
|
||||
return cls(Redis.from_url(engine_config["uri"]))
|
||||
|
||||
def get_json(self, key: str) -> Any | None:
|
||||
try:
|
||||
|
@ -28,7 +28,7 @@
|
||||
"uri": "127.0.0.1:11211"
|
||||
},
|
||||
"redis": {
|
||||
"uri": "127.0.0.1:6379"
|
||||
"uri": "redis://127.0.0.1:6379/0"
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
|
@ -15,7 +15,7 @@ class Migration(BaseMigration):
|
||||
{
|
||||
"type": None,
|
||||
"memcached": {"uri": "127.0.0.1:11211"},
|
||||
"redis": {"uri": "127.0.0.1:6379"},
|
||||
"redis": {"uri": "redis://127.0.0.1:6379/0"},
|
||||
},
|
||||
*[],
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user