Files
notifications-admin/app/cloudfoundry_config.py
Ben Thorner 4a3ba97115 Remove redundant conditional for CF Redis
This is now used in all environments and we've removed support for
non-CF Redis [1].

[1]: https://github.com/alphagov/notifications-admin/pull/4213
2022-04-20 11:32:57 +01:00

8 lines
197 B
Python

import json
import os
def extract_cloudfoundry_config():
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
os.environ['REDIS_URL'] = vcap_services['redis'][0]['credentials']['uri']