Connects to the Redis server if not already connected
(self)
| 1001 | return self._parser |
| 1002 | |
| 1003 | def connect(self): |
| 1004 | "Connects to the Redis server if not already connected" |
| 1005 | # try once the socket connect with the handshake, retry the whole |
| 1006 | # connect/handshake flow based on retry policy |
| 1007 | self.retry.call_with_retry( |
| 1008 | lambda: self.connect_check_health( |
| 1009 | check_health=True, retry_socket_connect=False |
| 1010 | ), |
| 1011 | lambda error: self.disconnect(error), |
| 1012 | ) |
| 1013 | |
| 1014 | def connect_check_health( |
| 1015 | self, check_health: bool = True, retry_socket_connect: bool = True |
no test coverage detected