It doesn't work properly in Redis Sentinel environment
oopty opened this issue · 1 comments
oopty commented
Our project is using Redis Sentinel.
I made url and connected it according to the method guided by this repository, but I couldn't connect to Sentinel.
redis+sentinel://[:password@]host:port[,host2:port2,...][/service_name[/db]][?param1=value1[¶m2=value=2&...]]
The reason is that the password is not handed over to the second parameter in the code below. Even if the password is included in redis_url, the redis_sentinel_url library does not interpret and use the password.
_, current_app.redis_conn = from_url((redis_url,)[0])
I think it should be changed as below.
_, current_app.redis_conn = from_url((redis_url,)[0], sentinel_options={ 'password' : <redis-password>})
oopty commented
please check my forked repository that had worked properly
https://github.com/oopty/rq-dashboard