redisai-py
redisai-py copied to clipboard
How to use redisai client in redis cluster environment?
Hi, I'm jaehyeong. I've been using RedisAI in redis cluster environment (3 nodes) and I have an issue about redisai client.
First, This is my 3 redis cluster environment.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c1e92b73241e redislabs/redisai:latest "docker-entrypoint.s…" 4 hours ago Up 37 minutes 0.0.0.0:7001->7001/tcp, 6379/tcp, 0.0.0.0:17001->17001/tcp redis-cluster-test_redis-cluster-1_1
e02becc34028 redislabs/redisai:latest "docker-entrypoint.s…" 4 hours ago Up 37 minutes 0.0.0.0:7002->7002/tcp, 6379/tcp, 0.0.0.0:17002->17002/tcp redis-cluster-test_redis-cluster-2_1
4e50e5f16b06 redislabs/redisai:latest "docker-entrypoint.s…" 4 hours ago Up 37 minutes 0.0.0.0:7003->7003/tcp, 6379/tcp, 0.0.0.0:17003->17003/tcp redis-cluster-test_redis-cluster-3_1
I had checked that redis cluster works fine using redis-cli.
And I tried to get data through redisai client.
from redisai import Client
client = Client(host='172.21.0.4', port=7001)
client.tensorget('tA')
but, I got this error.
I think error occured because redisai client is single connection client. So, How I control redis cluster using redisai client?
Thanks