From 4bbb55a06e078fab15bda0efe3e4ebd1b5493b86 Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Wed, 31 Oct 2018 16:03:10 -0400 Subject: [PATCH] Add RQ_QUEUES to default config We can use string interpolation in the file rather than building it when making the config. Adding the value to the config allows us to override it with an environment variable, if we want to (as we do for the UAT environment). --- atst/app.py | 2 +- config/base.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/atst/app.py b/atst/app.py index cad01fea..591e5c65 100644 --- a/atst/app.py +++ b/atst/app.py @@ -102,7 +102,7 @@ def map_config(config): ), "REQUIRE_CRLS": config.getboolean("default", "REQUIRE_CRLS"), "RQ_REDIS_URL": config["default"]["REDIS_URI"], - "RQ_QUEUES": ["atat_{}".format(ENV.lower())], + "RQ_QUEUES": [config["default"]["RQ_QUEUES"]], } diff --git a/config/base.ini b/config/base.ini index 491ab0e4..ab075e1d 100644 --- a/config/base.ini +++ b/config/base.ini @@ -16,6 +16,7 @@ PGUSER = postgres PORT=8000 REDIS_URI = redis://localhost:6379 REQUIRE_CRLS = true +RQ_QUEUES = atat_%(ENVIRONMENT)s SECRET = change_me_into_something_secret SECRET_KEY = change_me_into_something_secret SESSION_COOKIE_NAME=atat