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

Method send_request

cassandra/cluster.py:4534–4549  ·  view source on GitHub ↗

Internal

(self, error_no_hosts=True)

Source from the content-addressed store, hash-verified

4532 self.query_plan = iter(self._load_balancer.make_query_plan(self.session.keyspace, self.query))
4533
4534 def send_request(self, error_no_hosts=True):
4535 """ Internal """
4536 # query_plan is an iterator, so this will resume where we last left
4537 # off if send_request() is called multiple times
4538 for host in self.query_plan:
4539 req_id = self._query(host)
4540 if req_id is not None:
4541 self._req_id = req_id
4542 return True
4543 if self.timeout is not None and time.time() - self._start_time > self.timeout:
4544 self._on_timeout()
4545 return True
4546 if error_no_hosts:
4547 self._set_final_exception(NoHostAvailable(
4548 "Unable to complete the operation against any hosts", self._errors))
4549 return False
4550
4551 def _query(self, host, message=None, cb=None):
4552 if message is None:

Calls 5

_queryMethod · 0.95
_on_timeoutMethod · 0.95
_set_final_exceptionMethod · 0.95
NoHostAvailableClass · 0.85
timeMethod · 0.45