Harrison/redis (#2588)

Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
fix-readthedocs
Harrison Chase 1 year ago committed by GitHub
parent 40469eef7f
commit 2f49c96532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,11 +27,13 @@ REDIS_REQUIRED_MODULES = [
def _check_redis_module_exist(client: RedisType, modules: List[dict]) -> None:
"""Check if the correct Redis modules are installed."""
installed_modules = client.info().get("modules", [])
installed_modules = {module["name"]: module for module in installed_modules}
installed_modules = client.module_list()
installed_modules = {
module[b"name"].decode("utf-8"): module for module in installed_modules
}
for module in modules:
if module["name"] not in installed_modules or int(
installed_modules[module["name"]]["ver"]
installed_modules[module["name"]][b"ver"]
) < int(module["ver"]):
error_message = (
"You must add the RediSearch (>= 2.4) module from Redis Stack. "

Loading…
Cancel
Save