(self, idx, statement, params)
| 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() |
no test coverage detected