From 5b195cf8729f052485946683412d0e084ac548fc Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Tue, 26 May 2020 16:35:27 -0500 Subject: [PATCH] Issue #42: Use correct redis Django connection info. --- roles/tower/templates/tower_config.yaml.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/roles/tower/templates/tower_config.yaml.j2 b/roles/tower/templates/tower_config.yaml.j2 index e1b501c9..121c3a1b 100644 --- a/roles/tower/templates/tower_config.yaml.j2 +++ b/roles/tower/templates/tower_config.yaml.j2 @@ -112,11 +112,17 @@ data: BROKER_URL = 'redis://{}:{}/'.format( '{{ meta.name }}-redis.{{ meta.namespace }}.svc.cluster.local', - '6379',) + '6379') CHANNEL_LAYERS = { - 'default': {'BACKEND': 'awx.main.channels.RedisGroupBroadcastChannelLayer', - 'CONFIG': {'hosts': [("{{ meta.name }}-redis.{{ meta.namespace }}.svc.cluster.local", 6379)]}} + "default": { + "BACKEND": "channels_redis.core.RedisChannelLayer", + "CONFIG": { + "hosts": [BROKER_URL], + "capacity": 10000, + "group_expiry": 157784760, # 5 years + } + } } USE_X_FORWARDED_PORT = True