(self)
| 200 | exception_queue.put_nowait(e) |
| 201 | |
| 202 | def stop(self): |
| 203 | logging.info("Stopping server") |
| 204 | self.event_loop.call_soon_threadsafe(lambda: self.stop_signal.put_nowait(None)) |
| 205 | self.thread.join(5) |
| 206 | |
| 207 | try: |
| 208 | exc = self.exception_queue.get_nowait() |
| 209 | logging.info("Server stopped with an exception") |
| 210 | raise exc |
| 211 | except queue.Empty: |
| 212 | logging.info("Server stopped") |
| 213 | |
| 214 | |
| 215 | async def extract_mock_input(request: Request, cmd: str) -> CommandInput: |