Skip to content

Commit 4344145

Browse files
async_cluster: update docstrings
1 parent 9a4c741 commit 4344145

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

redis/asyncio/cluster.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, AsyncRedisClusterCommand
6767
Pass one of parameters:
6868
6969
- `url`
70-
- `host`
70+
- `host` & `port`
7171
- `startup_nodes`
7272
73-
| Use :meth:`initialize` to find cluster nodes & create connections.
74-
| Use :meth:`close` to disconnect connections & close client.
73+
| Use ``await`` :meth:`initialize` to find cluster nodes & create connections.
74+
| Use ``await`` :meth:`close` to disconnect connections & close client.
7575
7676
Many commands support the target_nodes kwarg. It can be one of the
7777
:attr:`NODE_FLAGS`:
@@ -82,10 +82,12 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, AsyncRedisClusterCommand
8282
- :attr:`RANDOM`
8383
- :attr:`DEFAULT_NODE`
8484
85+
Note: This client is not thread/process/fork safe.
86+
8587
:param host:
8688
| Can be used to point to a startup node
8789
:param port:
88-
| Port used if **host** or **url** is provided
90+
| Port used if **host** is provided
8991
:param startup_nodes:
9092
| :class:`~.ClusterNode` to used as a startup node
9193
:param cluster_error_retry_attempts:
@@ -117,7 +119,7 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, AsyncRedisClusterCommand
117119
| See :meth:`.from_url`
118120
:param kwargs:
119121
| Extra arguments that will be passed to the
120-
:class:`~redis.asyncio.connection.Connection` instance when created
122+
:class:`~redis.asyncio.connection.Connection` instances when created
121123
122124
:raises RedisClusterException:
123125
if any arguments are invalid. Eg:
@@ -165,9 +167,9 @@ def from_url(cls, url: str, **kwargs) -> "RedisCluster":
165167
All querystring options are cast to their appropriate Python types.
166168
Boolean arguments can be specified with string values "True"/"False"
167169
or "Yes"/"No". Values that cannot be properly cast cause a
168-
``ValueError`` to be raised. Once parsed, the querystring arguments
169-
and keyword arguments are passed to the ``ConnectionPool``'s
170-
class initializer. In the case of conflicting arguments, querystring
170+
``ValueError`` to be raised. Once parsed, the querystring arguments and
171+
keyword arguments are passed to :class:`~redis.asyncio.connection.Connection`
172+
when created. In the case of conflicting arguments, querystring
171173
arguments always win.
172174
173175
"""

0 commit comments

Comments
 (0)