rq-dashboard icon indicating copy to clipboard operation
rq-dashboard copied to clipboard

RQ_DASHBOARD_REDIS_URL from config file is ignored

Open srazzell opened this issue 1 year ago • 1 comments

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.

srazzell avatar Aug 30 '23 17:08 srazzell

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

superjcvd avatar Jan 09 '24 16:01 superjcvd