Closed muslih-DIY closed 5 months ago
this part of the program is causing the issue https://github.com/redis/redis-om-python/blob/1213ca7373ba4f1347a5298e7f6f63cb09949ad2/aredis_om/checks.py#L9
i was working with redis_om not aredis_om
from functools import lru_cache
from typing import List
from redis_om.connections import get_redis_connection
@lru_cache(maxsize=None)
def check_for_command(conn, cmd):
cmd_info = conn.execute_command("command","info" ,cmd)
return None not in cmd_info
@lru_cache(maxsize=None)
def has_redis_json(conn=None):
if conn is None:
conn = get_redis_connection()
command_exists = check_for_command(conn, "json.set")
return command_exists
@lru_cache(maxsize=None)
def has_redisearch(conn=None):
if conn is None:
conn = get_redis_connection()
if has_redis_json(conn):
return True
command_exists = check_for_command(conn, "ft.search")
return command_exists
@uglide if it is works, please create and merge this issue
this may also solve #532
This sounds like a Redis Versioning / ACL issue - are you using a version of Redis with COMMAND INFO
and one where you've given the client permission to use the COMMAND INFO
command?
Going to close this issue to tidy up (think it's an ACL issue) if the issue persists please feel free to reopen.
here is the program i was trying after declaring the model