Total Complexity | 2 |
Total Lines | 10 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | import json |
||
32 | class ProductionConfig(Config): |
||
33 | DEBUG = True # TODO: remove |
||
34 | if os.getenv("VCAP_SERVICES"): |
||
35 | services = json.loads(os.getenv("VCAP_SERVICES")) |
||
36 | if "p-redis" in services: |
||
37 | redis_env = services["p-redis"][0]["credentials"] |
||
38 | REDIS_URL = "redis://:" + redis_env["password"] + "@" + redis_env["host"] + ":" + str(redis_env["port"]) + "/0" |
||
39 | else: |
||
40 | redis_env = services["rediscloud"][0]["credentials"] |
||
41 | REDIS_URL = "redis://:" + redis_env["password"] + "@" + redis_env["hostname"] + ":" + str(redis_env["port"]) + "/0" |
||
42 | |||
50 |