|
4 | 4 | import threading
|
5 | 5 | import time
|
6 | 6 | from collections import OrderedDict
|
7 |
| -from typing import Any, Callable, Dict, Optional, Tuple, Union |
| 7 | +from typing import Any, Callable, Dict, List, Optional, Tuple, Union |
8 | 8 |
|
9 | 9 | from redis.backoff import get_default_backoff
|
10 | 10 | from redis.client import CaseInsensitiveDict, PubSub, Redis, parse_scan
|
@@ -428,11 +428,11 @@ def __init__(
|
428 | 428 | self,
|
429 | 429 | host: Optional[str] = None,
|
430 | 430 | port: int = 6379,
|
431 |
| - startup_nodes: Optional[list["ClusterNode"]] = None, |
| 431 | + startup_nodes: Optional[List["ClusterNode"]] = None, |
432 | 432 | cluster_error_retry_attempts: int = 3,
|
433 | 433 | connection_error_retry_attempts: int = 3,
|
434 | 434 | retry: Optional["Retry"] = None,
|
435 |
| - retry_on_error: Optional[list[Exception]] = None, |
| 435 | + retry_on_error: Optional[List[Exception]] = None, |
436 | 436 | require_full_coverage: bool = False,
|
437 | 437 | reinitialize_steps: int = 10,
|
438 | 438 | read_from_replicas: bool = False,
|
@@ -1510,8 +1510,8 @@ def initialize(self):
|
1510 | 1510 |
|
1511 | 1511 | if not startup_nodes_reachable:
|
1512 | 1512 | raise RedisClusterException(
|
1513 |
| - "Redis Cluster cannot be connected. Please provide at least " |
1514 |
| - "one reachable node" |
| 1513 | + f"Redis Cluster cannot be connected. Please provide at least " |
| 1514 | + f"one reachable node: {str(exception)}" |
1515 | 1515 | ) from exception
|
1516 | 1516 |
|
1517 | 1517 | # Create Redis connections to all nodes
|
@@ -1697,9 +1697,9 @@ def __init__(
|
1697 | 1697 | self,
|
1698 | 1698 | nodes_manager: "NodesManager",
|
1699 | 1699 | commands_parser: "CommandsParser",
|
1700 |
| - result_callbacks: Optional[dict[str, Callable]] = None, |
1701 |
| - cluster_response_callbacks: Optional[dict[str, Callable]] = None, |
1702 |
| - startup_nodes: Optional[list["ClusterNode"]] = None, |
| 1700 | + result_callbacks: Optional[Dict[str, Callable]] = None, |
| 1701 | + cluster_response_callbacks: Optional[Dict[str, Callable]] = None, |
| 1702 | + startup_nodes: Optional[List["ClusterNode"]] = None, |
1703 | 1703 | read_from_replicas: bool = False,
|
1704 | 1704 | cluster_error_retry_attempts: int = 3,
|
1705 | 1705 | reinitialize_steps: int = 10,
|
|
0 commit comments