mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +03:00
Fix some incorrect backend layer references
This commit is contained in:
parent
a9810014ca
commit
5df99c9cfd
|
@ -47,7 +47,7 @@ custom consumer we wrote above. Here's what that looks like::
|
||||||
# In settings.py
|
# In settings.py
|
||||||
CHANNEL_BACKENDS = {
|
CHANNEL_BACKENDS = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "channels.backends.database.DatabaseChannelBackend",
|
"BACKEND": "channels.database_layer.DatabaseChannelLayer",
|
||||||
"ROUTING": "myproject.routing.channel_routing",
|
"ROUTING": "myproject.routing.channel_routing",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ DATABASES = {
|
||||||
|
|
||||||
CHANNEL_BACKENDS = {
|
CHANNEL_BACKENDS = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "channels.backends.database.DatabaseChannelBackend",
|
"BACKEND": "channels.database_layer.DatabaseChannelLayer",
|
||||||
"ROUTING": "testproject.urls.channel_routing",
|
"ROUTING": "testproject.urls.channel_routing",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if os.environ.get("USEREDIS", None):
|
if os.environ.get("USEREDIS", None):
|
||||||
CHANNEL_BACKENDS['default']['BACKEND'] = "channels.backends.redis_py.RedisChannelBackend"
|
CHANNEL_BACKENDS['default']['BACKEND'] = "asgi_redis.RedisChannelLayer"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user