Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-06-05 14:00:51 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
3c778de760e4858dd7abf15b00a86cdff599d190
notifications-admin/app/cloudfoundry_config.py

8 lines
213 B
Python
Raw Normal View History

Run on Paas
2016-12-08 16:50:37 +00:00
import json
Enforce order and style of imports Done using isort[1], with the following command: ``` isort -rc ./app ./tests ``` Adds linting to the `run_tests.sh` script to stop badly-sorted imports getting re-introduced. Chosen style is ‘Vertical Hanging Indent’ with trailing commas, because I think it gives the cleanest diffs, eg: ``` from third_party import ( lib1, lib2, lib3, lib4, ) ``` 1. https://pypi.python.org/pypi/isort
2018-02-20 11:22:17 +00:00
import os
Run on Paas
2016-12-08 16:50:37 +00:00
def extract_cloudfoundry_config():
Add support for migrating to Redis on PaaS Similarly to https://github.com/alphagov/notifications-api/pull/3508
2022-04-12 16:48:38 +01:00
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
Initial config for local deployments Not yet working properly on cloud.gov
2022-06-23 15:53:23 -07:00
os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri']
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1176ms Template: 21ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API