(self)
| 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 | """ |
no test coverage detected