diff --git a/foursight_core/react/api/auth.py b/foursight_core/react/api/auth.py index 85804f396..05a383a3b 100644 --- a/foursight_core/react/api/auth.py +++ b/foursight_core/react/api/auth.py @@ -40,8 +40,7 @@ def get_redis_handler(self): # 2023-09-21: Moved this from __init__ to here; # it speeds up provision/deploy from 4dn-cloud-infra. try: - redis_url = os.environ['REDIS_HOST'] - if redis_url and ("redis://" in redis_url or "rediss://" in redis_url): + if (redis_url := os.environ.get('REDIS_HOST')) and ("redis://" in redis_url or "rediss://" in redis_url): self._redis = RedisBase(create_redis_client(url=redis_url)) except (redis.exceptions.ConnectionError, redis.exceptions.TimeoutError): PRINT('Cannot connect to Redis') diff --git a/pyproject.toml b/pyproject.toml index 7900f8508..f4d226ffc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "foursight-core" -version = "5.1.0.1b3" # TODO: To become 5.2.0 +version = "5.1.0.1b4" # TODO: To become 5.2.0 description = "Serverless Chalice Application for Monitoring" authors = ["4DN-DCIC Team "] license = "MIT"