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

Method _execute

cassandra/concurrent.py:83–99  ·  view source on GitHub ↗
(self, idx, statement, params)

Source from the content-addressed store, hash-verified

81 pass
82
83 def _execute(self, idx, statement, params):
84 self._exec_depth += 1
85 try:
86 future = self.session.execute_async(statement, params, execution_profile=self._execution_profile)
87 args = (future, idx)
88 future.add_callbacks(
89 callback=self._on_success, callback_args=args,
90 errback=self._on_error, errback_args=args)
91 except Exception as exc:
92 # If we're not failing fast and all executions are raising, there is a chance of recursing
93 # here as subsequent requests are attempted. If we hit this threshold, schedule this result/retry
94 # and let the event loop thread return.
95 if self._exec_depth < self.max_error_recursion:
96 self._put_result(exc, idx, False)
97 else:
98 self.session.submit(self._put_result, exc, idx, False)
99 self._exec_depth -= 1
100
101 def _on_success(self, result, future, idx):
102 future.clear_callbacks()

Callers 1

_execute_nextMethod · 0.95

Calls 4

execute_asyncMethod · 0.80
add_callbacksMethod · 0.45
_put_resultMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected