连接到 localhost:6379 时出错。由于目标机器主动拒绝,无法建立连接。
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [("localhost", 6379)],
},
"ROUTING": "mysite.routing.channel_routing",
},
}
pip install asgi_redis 完成,我正在关注http://channels.readthedocs.io/en/latest/getting-started.html#running-with-channels