diff --git a/src/ert/ensemble_evaluator/evaluator.py b/src/ert/ensemble_evaluator/evaluator.py index d88f61a25da..6ddf949e5b6 100644 --- a/src/ert/ensemble_evaluator/evaluator.py +++ b/src/ert/ensemble_evaluator/evaluator.py @@ -8,8 +8,6 @@ Any, Awaitable, Callable, - Dict, - Generator, Iterable, List, Sequence, @@ -275,11 +273,11 @@ async def forward_checksum(self, event: Event) -> None: await self._manifest_queue.put(event) async def _server(self) -> None: - _zmq_context = zmq.asyncio.Context() + zmq_context = zmq.asyncio.Context() try: print("INIT ZMQ ...") # Create and configure the ROUTER socket - self._router_socket: zmq.asyncio.Socket = _zmq_context.socket(zmq.ROUTER) + self._router_socket: zmq.asyncio.Socket = zmq_context.socket(zmq.ROUTER) self._router_socket.setsockopt(zmq.LINGER, 0) if self._config.server_public_key and self._config.server_secret_key: self._router_socket.curve_secretkey = self._config.server_secret_key @@ -322,7 +320,7 @@ async def _server(self) -> None: finally: try: self._router_socket.close() - _zmq_context.destroy() + zmq_context.destroy() except Exception as exc: logger.warning(f"Failed to clean up zmq context {exc}") logger.info("ZMQ cleanup done!")