You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+38-6
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Provides Django Channels channel layers that use Redis as a backing store.
11
11
12
12
There are two available implementations:
13
13
14
-
* ``RedisChannelLayer`` is the orignal layer, and implements channel and group
14
+
* ``RedisChannelLayer`` is the original layer, and implements channel and group
15
15
handling itself.
16
16
* ``RedisPubSubChannelLayer`` is newer and leverages Redis Pub/Sub for message
17
17
dispatch. This layer is currently at *Beta* status, meaning it may be subject
@@ -65,13 +65,23 @@ Possible options for ``CONFIG`` are listed below.
65
65
``hosts``
66
66
~~~~~~~~~
67
67
68
-
The server(s) to connect to, as either URIs, ``(host, port)`` tuples, or dicts conforming to `create_connection <https://aioredis.readthedocs.io/en/v1.1.0/api_reference.html#aioredis.create_connection>`_.
69
-
Defaults to ``['localhost', 6379]``. Pass multiple hosts to enable sharding,
68
+
The server(s) to connect to, as either URIs, ``(host, port)`` tuples, or dicts conforming to `redis Connection <https://redis-py.readthedocs.io/en/v4.3.3/connections.html#redis.connection.Connection>`_.
69
+
Defaults to ``redis://localhost:6379``. Pass multiple hosts to enable sharding,
70
70
but note that changing the host list will lose some sharded data.
71
71
72
-
Sentinel connections require dicts conforming to `create_sentinel <https://aioredis.readthedocs.io/en/v1.3.0/sentinel.html#aioredis.sentinel.create_sentinel>`_
73
-
with an additional `master_name` key specifying the Sentinel
74
-
master set. Plain Redis and Sentinel connections can be mixed and matched if
72
+
Sentinel connections require dicts conforming to:
73
+
74
+
.. code-block::
75
+
76
+
{
77
+
"sentinels": [
78
+
("localhost", 26379),
79
+
],
80
+
"master_name": SENTINEL_MASTER_SET,
81
+
**kwargs
82
+
}
83
+
84
+
note the additional ``master_name`` key specifying the Sentinel master set and any additional connection kwargs can also be passed. Plain Redis and Sentinel connections can be mixed and matched if
75
85
sharding.
76
86
77
87
If your server is listening on a UNIX domain socket, you can also use that to connect: ``["unix:///path/to/redis.sock"]``.
@@ -233,6 +243,28 @@ Your Redis server must support the following commands:
0 commit comments