MCPcopy
hub / github.com/redis/redis-py / check_health

Method check_health

redis/client.py:1298–1308  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1296 )
1297
1298 def check_health(self) -> None:
1299 conn = self.connection
1300 if conn is None:
1301 raise RuntimeError(
1302 "pubsub connection not set: "
1303 "did you forget to call subscribe() or psubscribe()?"
1304 )
1305
1306 if conn.health_check_interval and time.monotonic() > conn.next_health_check:
1307 conn.send_command("PING", self.HEALTH_CHECK_MESSAGE, check_health=False)
1308 self.health_check_response_counter += 1
1309
1310 def _normalize_keys(self, data) -> Dict:
1311 """

Callers 1

parse_responseMethod · 0.95

Calls 2

monotonicMethod · 0.80
send_commandMethod · 0.45

Tested by

no test coverage detected