Fixed check for presence of modules.
This commit is contained in:
parent
e9fbd56e4e
commit
d60fce5231
1 changed files with 2 additions and 5 deletions
|
@ -6,11 +6,8 @@ from aredis_om.connections import get_redis_connection
|
||||||
|
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
async def check_for_command(conn, cmd):
|
async def check_for_command(conn, cmd):
|
||||||
try:
|
|
||||||
cmd_info = await conn.execute_command("command", "info", cmd)
|
cmd_info = await conn.execute_command("command", "info", cmd)
|
||||||
return True
|
return not None in cmd_info
|
||||||
except TypeError:
|
|
||||||
return False
|
|
||||||
|
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
async def has_redis_json(conn=None):
|
async def has_redis_json(conn=None):
|
||||||
|
|
Loading…
Reference in a new issue