Maintain round trip times for a server. The Topology is weakly referenced.
(self, topology: Topology, topology_settings: TopologySettings, pool: Pool)
| 438 | |
| 439 | class _RttMonitor(MonitorBase): |
| 440 | def __init__(self, topology: Topology, topology_settings: TopologySettings, pool: Pool): |
| 441 | """Maintain round trip times for a server. |
| 442 | |
| 443 | The Topology is weakly referenced. |
| 444 | """ |
| 445 | super().__init__( |
| 446 | topology, |
| 447 | "pymongo_server_rtt_task", |
| 448 | topology_settings.heartbeat_frequency, |
| 449 | common.MIN_HEARTBEAT_INTERVAL, |
| 450 | ) |
| 451 | |
| 452 | self._pool = pool |
| 453 | self._moving_average = MovingAverage() |
| 454 | self._moving_min = MovingMinimum() |
| 455 | self._lock = _async_create_lock() |
| 456 | |
| 457 | async def close(self) -> None: |
| 458 | self.gc_safe_close() |
nothing calls this directly
no test coverage detected