Skip to content

Commit 6b0d39a

Browse files
authored
Skip echo call for RedisCluster mode (#344)
echo is not available for RedisCluster mode hence skipping the echo in cluster mode
1 parent 89e4c00 commit 6b0d39a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

redisvl/redis/connection.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ def validate_sync_redis(
400400
redis_client.client_setinfo("LIB-NAME", _lib_name)
401401
except ResponseError:
402402
# Fall back to a simple log echo
403-
redis_client.echo(_lib_name)
403+
# For RedisCluster, echo is not available
404+
if hasattr(redis_client, "echo"):
405+
await redis_client.echo(_lib_name)
404406

405407
# Get list of modules
406408
installed_modules = RedisConnectionFactory.get_modules(redis_client)
@@ -426,6 +428,8 @@ async def validate_async_redis(
426428
except ResponseError:
427429
# Fall back to a simple log echo
428430
await redis_client.echo(_lib_name)
431+
if hasattr(redis_client, "echo"):
432+
await redis_client.echo(_lib_name)
429433

430434
# Get list of modules
431435
installed_modules = await RedisConnectionFactory.get_modules_async(redis_client)

0 commit comments

Comments
 (0)