浏览代码

doc: adding examples to connect to sentinel broker (#4143)

Signed-off-by: Geoffrey Bauduin <geoffrey.bauduin@corp.ovh.com>
Geoffrey Bauduin 7 年之前
父节点
当前提交
afebe7a6e0
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      docs/getting-started/brokers/redis.rst

+ 9 - 0
docs/getting-started/brokers/redis.rst

@@ -51,6 +51,13 @@ by adding the ``virtual_host`` parameter to the URL:
 
 
     redis+socket:///path/to/redis.sock?virtual_host=db_number
     redis+socket:///path/to/redis.sock?virtual_host=db_number
 
 
+It is also easy to connect directly to a list of Redis Sentinel:
+
+.. code-block:: python
+
+    app.conf.broker_url = 'sentinel://localhost:26379;sentinel://localhost:26380;sentinel://localhost:26381'
+    app.conf.broker_transport_options = { 'master_name': "cluster1" }
+
 .. _redis-visibility_timeout:
 .. _redis-visibility_timeout:
 
 
 Visibility Timeout
 Visibility Timeout
@@ -81,6 +88,8 @@ you should configure these settings::
 For a complete list of options supported by the Redis result backend, see
 For a complete list of options supported by the Redis result backend, see
 :ref:`conf-redis-result-backend`
 :ref:`conf-redis-result-backend`
 
 
+*Note that sentinel is not a supported backend*
+
 .. _redis-caveats:
 .. _redis-caveats:
 
 
 Caveats
 Caveats