update some doc about the redis backend

This commit is contained in:
Arne Schauf 2015-09-17 18:06:26 +02:00
parent c1990a92ed
commit 7cd5a02ee9
2 changed files with 20 additions and 1 deletions

View File

@ -21,6 +21,20 @@ Database
Redis Redis
----- -----
To use the Redis backend you have to install the redis package::
pip install -U redis
Also you need to set the following in the ``CHANNEL_BACKENDS`` setting::
CHANNEL_BACKENDS = {
"default": {
"BACKEND": "channels.backends.redis_py.RedisChannelBackend",
"HOST": "redis-hostname",
},
}
Writing Custom Backends Writing Custom Backends
----------------------- -----------------------

View File

@ -36,11 +36,16 @@ here's an example for a remote Redis server::
CHANNEL_BACKENDS = { CHANNEL_BACKENDS = {
"default": { "default": {
"BACKEND": "channels.backends.redis.RedisChannelBackend", "BACKEND": "channels.backends.redis_py.RedisChannelBackend",
"HOST": "redis-channel", "HOST": "redis-channel",
}, },
} }
To use the Redis backend you have to install the redis package::
pip install -U redis
Make sure the same setting file is used across all your workers, interfaces Make sure the same setting file is used across all your workers, interfaces
and WSGI apps; without it, they won't be able to talk to each other and things and WSGI apps; without it, they won't be able to talk to each other and things
will just fail to work. will just fail to work.