Communicate with pipeline to send commands and possibly fetch results, which are then processed.
(self)
| 106 | yield from self._fetch_gen(flush=True) |
| 107 | |
| 108 | def _communicate_gen(self) -> PQGen[None]: |
| 109 | """Communicate with pipeline to send commands and possibly fetch |
| 110 | results, which are then processed. |
| 111 | """ |
| 112 | fetched = yield from pipeline_communicate(self.pgconn, self.command_queue) |
| 113 | exception = None |
| 114 | for results in fetched: |
| 115 | queued = self.result_queue.popleft() |
| 116 | try: |
| 117 | self._process_results(queued, results) |
| 118 | except e.Error as exc: |
| 119 | if exception is None: |
| 120 | exception = exc |
| 121 | if exception is not None: |
| 122 | raise exception |
| 123 | |
| 124 | def _fetch_gen(self, *, flush: bool) -> PQGen[None]: |
| 125 | """Fetch available results from the connection and process them with |
no test coverage detected