Return the final result or raise an Exception if errors were encountered. If the final result or error has not been set yet, this method will block until it is set, or the timeout set for the request expires. Timeout is specified in the Session request exec
(self)
| 4982 | self.send_request() |
| 4983 | |
| 4984 | def result(self): |
| 4985 | """ |
| 4986 | Return the final result or raise an Exception if errors were |
| 4987 | encountered. If the final result or error has not been set |
| 4988 | yet, this method will block until it is set, or the timeout |
| 4989 | set for the request expires. |
| 4990 | |
| 4991 | Timeout is specified in the Session request execution functions. |
| 4992 | If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised. |
| 4993 | This is a client-side timeout. For more information |
| 4994 | about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`. |
| 4995 | |
| 4996 | Example usage:: |
| 4997 | |
| 4998 | >>> future = session.execute_async("SELECT * FROM mycf") |
| 4999 | >>> # do other stuff... |
| 5000 | |
| 5001 | >>> try: |
| 5002 | ... rows = future.result() |
| 5003 | ... for row in rows: |
| 5004 | ... ... # process results |
| 5005 | ... except Exception: |
| 5006 | ... log.exception("Operation failed:") |
| 5007 | |
| 5008 | """ |
| 5009 | self._event.wait() |
| 5010 | if self._final_result is not _NOT_SET: |
| 5011 | return ResultSet(self, self._final_result) |
| 5012 | else: |
| 5013 | raise self._final_exception |
| 5014 | |
| 5015 | def get_query_trace_ids(self): |
| 5016 | """ |