MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / insert_next

Method insert_next

benchmarks/callback_full_pipeline.py:38–49  ·  view source on GitHub ↗
(self, previous_result=sentinel)

Source from the content-addressed store, hash-verified

36 self.event = Event()
37
38 def insert_next(self, previous_result=sentinel):
39 if previous_result is not sentinel:
40 if isinstance(previous_result, BaseException):
41 log.error("Error on insert: %r", previous_result)
42 if next(self.num_finished) >= self.num_queries:
43 self.event.set()
44
45 i = next(self.num_started)
46 if i <= self.num_queries:
47 key = "{0}-{1}".format(self.thread_num, i)
48 future = self.run_query(key, timeout=None)
49 future.add_callbacks(self.insert_next, self.insert_next)
50
51 def run(self):
52 self.start_profile()

Callers 1

runMethod · 0.95

Calls 2

run_queryMethod · 0.80
add_callbacksMethod · 0.45

Tested by

no test coverage detected