Parallels / rq-dashboard

Flask-based web front-end for monitoring RQ queues
http://python-rq.org/
Other
1.44k stars 328 forks source link

It doesn't work properly in Redis Sentinel environment #411

Open oopty opened 1 year ago

oopty commented 1 year ago

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[&param2=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])

above code link

I think it should be changed as below.

_, current_app.redis_conn = from_url((redis_url,)[0], sentinel_options={ 'password' : <redis-password>})
oopty commented 1 year ago

please check my forked repository that had worked properly https://github.com/oopty/rq-dashboard