Run operations of `fetches` without the session lock.
(self, fetches)
| 867 | return self.run_fetches(fetches) |
| 868 | |
| 869 | def run_fetches(self, fetches): |
| 870 | """Run operations of `fetches` without the session lock.""" |
| 871 | if self._closed: |
| 872 | raise RuntimeError("Attempted to use a closed Session.") |
| 873 | if not self._grpc_client: |
| 874 | raise RuntimeError("Session disconnected.") |
| 875 | fetch_handler = _FetchHandler(self.dag, fetches) |
| 876 | try: |
| 877 | response = self._grpc_client.run(fetch_handler.targets) |
| 878 | except FatalError: |
| 879 | self.close() |
| 880 | raise |
| 881 | if not self.eager(): |
| 882 | # Unload operations that cannot be touched anymore |
| 883 | dag_to_unload = fetch_handler.get_dag_for_unload() |
| 884 | try: |
| 885 | self._grpc_client.run(dag_to_unload) |
| 886 | except FatalError: |
| 887 | self.close() |
| 888 | raise |
| 889 | return fetch_handler.wrap_results(response) |
| 890 | |
| 891 | def _connect(self): |
| 892 | if self._config.coordinator.endpoint is not None: |
no test coverage detected