mirror of
https://github.com/django/daphne.git
synced 2025-04-21 17:22:03 +03:00
update some doc about the redis backend
This commit is contained in:
parent
c1990a92ed
commit
7cd5a02ee9
|
@ -21,6 +21,20 @@ Database
|
|||
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
|
||||
-----------------------
|
||||
|
||||
|
|
|
@ -36,11 +36,16 @@ here's an example for a remote Redis server::
|
|||
|
||||
CHANNEL_BACKENDS = {
|
||||
"default": {
|
||||
"BACKEND": "channels.backends.redis.RedisChannelBackend",
|
||||
"BACKEND": "channels.backends.redis_py.RedisChannelBackend",
|
||||
"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
|
||||
and WSGI apps; without it, they won't be able to talk to each other and things
|
||||
will just fail to work.
|
||||
|
|
Loading…
Reference in New Issue
Block a user