django channel_layer的设置办法

默认的\指定库\带密码.
CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [('IP', 6379)] }, }, } CHANNEL_LAYERS = { 'default': { 'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {"hosts": ["redis://IP:6379/1"],}, }, } CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": ["redis://:password@IP:6379/0"], "symmetric_encryption_keys": [SECRET_KEY], }, }, }
posted @ 2021-03-11 21:38  小小jyy  阅读(392)  评论(0)    收藏  举报