Open a9raag opened 11 months ago
Hi @chayim @simonprickett, can you guys please take a look at this?
Adding @dvora-h
We are planning to use redis-om in production and waiting for this fix. Any input will be appreciated @dvora-h Thanks :)
@chayim @dvora-h I'd love this checked in. If you have the time.
While connecting to a Redis Cluster Migrator run fails to
create_index
since the commands are executed using a Redis connection. In this scenario, there should be some way to distinguish betweenRedis
andRedisCluster
in order to avoid:redis.exceptions.MovedError: 13099 as mentioned in #408 #412 With RedisCluster support there would be an option to execute these commands on primary nodes and we won't run into the MovedError
In this PR: We can connect with RedisCluster using two ways:
get_redis_connection
method to allowcluster
parameter so it would be as straight forward as usingget_redis_connection(host='localhost', cluster=True)
get_redis_connection(url="redis://localhost:6379?cluster=true")
This resolves #408 and resolves #412