From 6f66a63d67ce1e98ce5053e67e385160cda6497e Mon Sep 17 00:00:00 2001 From: David McDonald Date: Mon, 10 Aug 2020 10:36:11 +0100 Subject: [PATCH 1/2] Remove unneeded hardcoding of REDIS_ENABLED This keeps things consistent with the live environment and also how we do it for the admin app where it is entirely up to environment variables whether redis is enabled or not. This changes nothing in terms of functionality as currently in our environment variables redis is enabled for the API in staging. --- app/config.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/config.py b/app/config.py index f3cb2e040..e666e8f42 100644 --- a/app/config.py +++ b/app/config.py @@ -481,7 +481,6 @@ class Staging(Config): FROM_NUMBER = 'stage' API_RATE_LIMIT_ENABLED = True CHECK_PROXY_HEADER = True - REDIS_ENABLED = True class Live(Config): @@ -523,7 +522,6 @@ class Sandbox(CloudFoundryConfig): LETTERS_SCAN_BUCKET_NAME = 'cf-sandbox-letters-scan' INVALID_PDF_BUCKET_NAME = 'cf-sandbox-letters-invalid-pdf' FROM_NUMBER = 'sandbox' - REDIS_ENABLED = False configs = { From 7b6bd21f19b0ca300c422b5229b9a64ddce943ae Mon Sep 17 00:00:00 2001 From: David McDonald Date: Mon, 10 Aug 2020 10:38:56 +0100 Subject: [PATCH 2/2] Turn off redis for cred rotation Short turn off in all environments to enable us to rotate creds. We will then immediately follow up with enabling it back on. --- app/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index e666e8f42..0072e2f3b 100644 --- a/app/config.py +++ b/app/config.py @@ -90,7 +90,7 @@ class Config(object): # URL of redis instance REDIS_URL = os.getenv('REDIS_URL') - REDIS_ENABLED = os.getenv('REDIS_ENABLED') == '1' + REDIS_ENABLED = False EXPIRE_CACHE_TEN_MINUTES = 600 EXPIRE_CACHE_EIGHT_DAYS = 8 * 24 * 60 * 60