美文网首页
django-channels channel_layer re

django-channels channel_layer re

作者: 向日葵1884 | 来源:发表于2020-04-28 13:35 被阅读0次

    三种,默认的\指定库\带密码.

    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],
            },
        },
    }
    

    相关文章

      网友评论

          本文标题:django-channels channel_layer re

          本文链接:https://www.haomeiwen.com/subject/hoyvwhtx.html