Cannot switch between different DBs of the same Redis instance
ostpoller opened this issue · 0 comments
I am using one redis-server instance as message broker for several services (Flask apps) and point them to different DBs of that instance.
FlaskApp-0:
from redis import Redis
redis = Redis.from_url("redis://:my-secret-password@127.0.0.1:6379/0")
...
FlaskApp-1:
from redis import Redis
redis = Redis.from_url("redis://:my-secret-password@127.0.0.1:6379/1")
...
The Flask apps and their workers appear to work as intended with their queues in separate DB spaces of the same Redis instance.
Here is my problem:
I would like to be able to select the redis URL including the DB from the drop-down selection box to switch between the message queues of the individual services. I tried the following:
RQ-Dashboard:
$ rq-dashboard -u redis://:my-secret-password@127.0.0.1:6379/0 \
-u redis://:my-secret-password@127.0.0.1:6379/1
I tried this because the help message to the option -u
says that it can be specified multiple times.
It appears as if only the last (right-most) URL takes effect and is listed in the dropdown selection box on the UI.
No other URL is listed in the dropdown selection box and can be switched to.
Do I do something wrong here? Is this behaviour intended?
I am using
- RQ-dashboard version: 0.6.1
- Python RQ version: 1.6.1
My current work-around is to include RQ-Dashboard in each Flask App and be specific about its URL including the DB number: app config RQ_DASHBOARD_REDIS_URL = "redis://:my-secret-password@127.0.0.1:6379/1"
.