Parallels / rq-dashboard

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

RQ_DASHBOARD_REDIS_URL from config file is ignored #463

Open srazzell opened 1 year ago

srazzell commented 1 year ago

Describe the bug When RQ_DASHBOARD_REDIS_URL is set in the config file, rq-dashboard will not use it and use the default of "redis://127.0.0.1:6379" instead.

You can see here: https://github.com/Parallels/rq-dashboard/blob/1767341a177a9c136ed4dfa9c9a12b5b8465fbe2/rq_dashboard/cli.py#L197

If you don't pass in the url in the command line, it will be set to the default local redis. The code needs only use the default if app.config["RQ_DASHBOARD_REDIS_URL"] is not set already.

To Reproduce Steps to reproduce the behavior:

  1. Set RQ_DASHBOARD_REDIS_URL in a config file
  2. Run rq-dashboard without -u but with -c pointing to the config file
  3. Try to load the home page and it will fail to connect to redis (if you don't have a local redis running)

Expected behavior If RQ_DASHBOARD_REDIS_URL is set in the config file/settings, it should use that url to connect to redis.

superjcvd commented 9 months ago

config file provided with --config option or RQ_DASHBOARD_SETTINGS env variable are both ignored!