MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / run

Method run

cassandra/datastax/insights/reporter.py:56–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 self.start()
55
56 def run(self):
57 self._send_via_rpc(self._get_startup_data())
58
59 # introduce some jitter -- send up to 1/10 of _interval early
60 self._shutdown_event.wait(self._interval * random.uniform(.9, 1))
61
62 while not self._shutdown_event.is_set():
63 start_time = time.time()
64
65 self._send_via_rpc(self._get_status_data())
66
67 elapsed = time.time() - start_time
68 self._shutdown_event.wait(max(self._interval - elapsed, 0.01))
69
70 # TODO: redundant with ConnectionHeartbeat.ShutdownException
71 class ShutDownException(Exception):

Callers

nothing calls this directly

Calls 5

_send_via_rpcMethod · 0.95
_get_startup_dataMethod · 0.95
_get_status_dataMethod · 0.95
waitMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected