Add REDIS_PORT to the settings and secrets

This commit is contained in:
Martin Pépin 2017-04-25 20:23:21 +01:00
parent 52d9979d7c
commit dbff7740c8
2 changed files with 5 additions and 3 deletions

View file

@ -23,7 +23,7 @@ except KeyError:
try:
from .secret import (
SECRET_KEY, RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY, ADMINS,
REDIS_PASSWD, REDIS_DB, REDIS_HOST
REDIS_PASSWD, REDIS_DB, REDIS_HOST, REDIS_PORT
)
except ImportError:
raise RuntimeError("Secrets missing")
@ -161,8 +161,9 @@ CHANNEL_LAYERS = {
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [(
"redis://:{}@{}:6379/{}"
.format(REDIS_PASSWD, REDIS_HOST, REDIS_DB)
"redis://:{passwd}@{host}:{port}/{db}"
.format(passwd=REDIS_PASSWD, host=REDIS_HOST,
port=REDIS_PORT, db=REDIS_DB)
)],
},
"ROUTING": "cof.routing.channel_routing",