diff options
author | Matus Valo <matusvalo@gmail.com> | 2020-09-23 23:01:04 +0200 |
---|---|---|
committer | Matus Valo <matusvalo@gmail.com> | 2020-09-23 23:01:04 +0200 |
commit | f475285894d7e3c2c13f5272168415724d6ff847 (patch) | |
tree | 5d9518cd195778e8d0ca13f1174993e42bac895e | |
parent | 56e88dc275831196ca396fce81275ac687d1207b (diff) | |
download | kombu-f475285894d7e3c2c13f5272168415724d6ff847.tar.gz |
Added Redis SentinelChannel to reference docs
-rw-r--r-- | docs/reference/kombu.transport.redis.rst | 7 | ||||
-rw-r--r-- | kombu/transport/redis.py | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/docs/reference/kombu.transport.redis.rst b/docs/reference/kombu.transport.redis.rst index 1307ab34..122140ab 100644 --- a/docs/reference/kombu.transport.redis.rst +++ b/docs/reference/kombu.transport.redis.rst @@ -22,3 +22,10 @@ .. autoclass:: Channel :members: :undoc-members: + + SentinelChannel + --------------- + + .. autoclass:: SentinelChannel + :members: + :undoc-members: diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 3dca36db..f8ce7b46 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -1091,16 +1091,28 @@ class SentinelChannel(Channel): Broker url is supposed to look like: - sentinel://0.0.0.0:26379;sentinel://0.0.0.0:26380/... + .. code-block:: + + sentinel://0.0.0.0:26379;sentinel://0.0.0.0:26380/... where each sentinel is separated by a `;`. Other arguments for the sentinel should come from the transport options - (see :method:`Celery.connection` which is in charge of creating the - `Connection` object). + (see `transport_options` of :class:`~kombu.connection.Connection`). You must provide at least one option in Transport options: * `master_name` - name of the redis group to poll + + Example: + + .. code-block:: python + + >>> import kombu + >>> c = kombu.Connection( + 'sentinel://sentinel1:26379;sentinel://sentinel2:26379', + transport_options={'master_name': 'mymaster'} + ) + >>> c.connect() """ from_transport_options = Channel.from_transport_options + ( |