From 09e2629b64d940446bcd6512083da8bd4504125f Mon Sep 17 00:00:00 2001 From: Jochen Saalfeld Date: Wed, 21 Nov 2018 15:41:27 +0100 Subject: [PATCH] the redis host needs to be configured for channel layers otherwise the post migration signal in django will try to establish an connection to localhost, no matter what redis server ip or adress was entered --- openslides/utils/settings.py.tpl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openslides/utils/settings.py.tpl b/openslides/utils/settings.py.tpl index 6dec3787b..092fbb874 100644 --- a/openslides/utils/settings.py.tpl +++ b/openslides/utils/settings.py.tpl @@ -82,10 +82,15 @@ if use_redis: # Django Channels # https://channels.readthedocs.io/en/latest/topics/channel_layers.html#configuration - - CHANNEL_LAYERS['default']['BACKEND'] = 'channels_redis.core.RedisChannelLayer' - CHANNEL_LAYERS['default']['CONFIG'] = {"capacity": 100000} - + CHANNEL_LAYERS = { + "default": { + "BACKEND": "channels_redis.core.RedisChannelLayer", + "CONFIG": { + "hosts": [("localhost", 6379)], + "capacity": 100000, + }, + }, + } # Collection Cache # Can be: