From ae896c98804271f2fed00629eb054eaacf929035 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Fri, 22 Apr 2022 12:05:19 +0100 Subject: [PATCH] remove `REDIS_ENABLED` flag from creds you can still use this flag locally but we have it enabled for all environments and it doesn't need to be toggleable from credentials as it isn't a secret value. If we wish to turn redis off for a specific environment we can create a PR to change the config. --- app/config.py | 4 +++- manifest.yml.j2 | 2 -- pytest.ini | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/config.py b/app/config.py index fcfb2c5db..2b359724d 100644 --- a/app/config.py +++ b/app/config.py @@ -114,7 +114,7 @@ class Config(object): # URL of redis instance REDIS_URL = os.getenv('REDIS_URL') - REDIS_ENABLED = os.getenv('REDIS_ENABLED') == '1' + REDIS_ENABLED = True EXPIRE_CACHE_TEN_MINUTES = 600 EXPIRE_CACHE_EIGHT_DAYS = 8 * 24 * 60 * 60 @@ -404,6 +404,8 @@ class Development(Config): DEBUG = True SQLALCHEMY_ECHO = False + REDIS_ENABLED = os.getenv('REDIS_ENABLED') == '1' + CSV_UPLOAD_BUCKET_NAME = 'development-notifications-csv-upload' CONTACT_LIST_BUCKET_NAME = 'development-contact-list' TEST_LETTERS_BUCKET_NAME = 'development-test-letters' diff --git a/manifest.yml.j2 b/manifest.yml.j2 index adea005bb..facd0807e 100644 --- a/manifest.yml.j2 +++ b/manifest.yml.j2 @@ -145,8 +145,6 @@ applications: FIRETEXT_INTERNATIONAL_API_KEY: '{{ FIRETEXT_INTERNATIONAL_API_KEY }}' FIRETEXT_INBOUND_SMS_AUTH: '{{ FIRETEXT_INBOUND_SMS_AUTH | tojson }}' - REDIS_ENABLED: '{{ REDIS_ENABLED }}' - TEMPLATE_PREVIEW_API_HOST: '{{ TEMPLATE_PREVIEW_API_HOST }}' TEMPLATE_PREVIEW_API_KEY: '{{ TEMPLATE_PREVIEW_API_KEY }}' diff --git a/pytest.ini b/pytest.ini index 7b739fee7..21050490e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,5 +5,6 @@ env = MMG_API_KEY=mmg-secret-key FIRETEXT_API_KEY=Firetext NOTIFICATION_QUEUE_PREFIX=testing + REDIS_ENABLED=0 addopts = -p no:warnings xfail_strict = true