Ping the Redis server to test connectivity. Sends a PING command to the Redis server and returns True if the server responds with "PONG".
(self, message: Union[str, None] = None)
| 1483 | get_sharded_message = get_message |
| 1484 | |
| 1485 | def ping(self, message: Union[str, None] = None) -> bool: |
| 1486 | """ |
| 1487 | Ping the Redis server to test connectivity. |
| 1488 | |
| 1489 | Sends a PING command to the Redis server and returns True if the server |
| 1490 | responds with "PONG". |
| 1491 | """ |
| 1492 | args = ["PING", message] if message is not None else ["PING"] |
| 1493 | return self.execute_command(*args) |
| 1494 | |
| 1495 | def handle_message(self, response, ignore_subscribe_messages=False): |
| 1496 | """ |