Skip to content

Commit d4fb032

Browse files
committed
shorten rows for flake8
1 parent e12b457 commit d4fb032

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

python/python/glide/async_commands/cluster_commands.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,18 @@ async def exec(
9999
100100
Args:
101101
batch (ClusterBatch): A `ClusterBatch` object containing a list of commands to be executed.
102-
route (Optional[TSingleNodeRoute]): If `route` is not provided, the transaction will be routed to the slot owner
103-
of the first key found in the transaction. If no key is found, the command will be sent to a random node.
104-
If `route` is provided, the client will route the command to the nodes defined by `route`.
105-
timeout (Optional[int]): Specifies a timeout in milliseconds for the execution of the batch.
106-
If the execution exceeds the timeout, it will be cancelled, and will raise an error. It is recommended to set a relatively high timeout,
107-
especially for complex or lengthy transactions, to avoid premature cancellations.
108-
retry_server_error (Optional[bool]): If set to `True`, the client will retry the batch execution in case of server errors.
109-
This is useful for handling transient server issues. Note that when retrying due to server errors, the order of commands
110-
within the batch may be reordered.
111-
retry_connection_error (Optional[bool]): If set to `True`, the client will retry the batch execution in case of connection errors.
112-
This is useful for handling network issues. Be aware that when retrying due to connection errors, commands within the batch
113-
may be executed multiple times.
114-
102+
route (Optional[TSingleNodeRoute]): If not provided, routes to slot owner of first key in transaction. If no key,
103+
sends to random node. If provided, routes to nodes defined by `route`.
104+
timeout (Optional[int]): Timeout in ms for batch execution. If exceeded, cancels and raises error. Set high
105+
timeout for complex transactions to avoid premature cancellation.
106+
retry_server_error (Optional[bool]): If True, retries batch on server errors. Useful for transient issues.
107+
Note: Command order may change on retry.
108+
retry_connection_error (Optional[bool]): If True, retries batch on connection errors. Useful for network issues.
109+
Note: Commands may execute multiple times.
115110
116111
Returns:
117-
Optional[List[TResult]]: A list of results corresponding to the execution of each command
118-
in the transaction. If a command returns a value, it will be included in the list. If a command
119-
doesn't return a value, the list entry will be `None`.
120-
121-
If the transaction failed due to a WATCH command, `exec` will return `None`.
112+
Optional[List[TResult]]: Results list matching executed commands. Contains values or None for commands without
113+
return values. Returns None if transaction failed due to WATCH command.
122114
"""
123115
commands = batch.commands[:]
124116
return await self._execute_batch(

0 commit comments

Comments
 (0)