Fixed check for presence of modules.

This commit is contained in:
Simon Prickett 2022-01-06 21:10:53 +00:00
parent e9fbd56e4e
commit d60fce5231

View file

@ -6,11 +6,8 @@ from aredis_om.connections import get_redis_connection
@lru_cache(maxsize=None)
async def check_for_command(conn, cmd):
try:
cmd_info = await conn.execute_command("command", "info", cmd)
return True
except TypeError:
return False
cmd_info = await conn.execute_command("command", "info", cmd)
return not None in cmd_info
@lru_cache(maxsize=None)
async def has_redis_json(conn=None):