Closed techblack closed 1 year ago
This place is passed by reference, which will cause the configuration to change, and other applications will read the wrong configuration
before this pr: from django.conf import settings getattr(settings, "CHANNEL_LAYERS", {}) result
from django.conf import settings getattr(settings, "CHANNEL_LAYERS", {})
{'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {'hosts': [{'sentinels': [('a.b.c.d', 6379)], 'master_name': 'redis-master', 'db': 0, 'password': 'password', 'sentinel_kwargs': {'password': 'password'}}]}}}
after channel connection result
{'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {'hosts': [{'db': 0, 'password': 'password'}]}}}
Also affected by this bug. Would love to see this get merged in soon.
I'm planning releases for the new year period. This is on the agenda for that.
Resolved in #352. Thanks.
This place is passed by reference, which will cause the configuration to change, and other applications will read the wrong configuration
before this pr:
from django.conf import settings getattr(settings, "CHANNEL_LAYERS", {})
result{'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {'hosts': [{'sentinels': [('a.b.c.d', 6379)], 'master_name': 'redis-master', 'db': 0, 'password': 'password', 'sentinel_kwargs': {'password': 'password'}}]}}}
after channel connection result
{'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {'hosts': [{'db': 0, 'password': 'password'}]}}}