Skip to content

Commit

Permalink
Don't use wait_for_evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Nov 13, 2024
1 parent 5ebe5d5 commit c3bb525
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/ert/ensemble_evaluator/_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from ert.run_arg import RunArg
from ert.scheduler import Scheduler, create_driver

from ._wait_for_evaluator import wait_for_evaluator
from .config import EvaluatorServerConfig
from .snapshot import EnsembleSnapshot, FMStepSnapshot, RealizationSnapshot
from .state import (
Expand Down Expand Up @@ -200,8 +199,8 @@ async def send_event(
cert: Optional[Union[str, bytes]] = None,
retries: int = 10,
) -> None:
async with Client(url, token, cert, max_retries=retries) as client:
await client._send(event_to_json(event))
with Client(url, token, cert, max_retries=retries) as client:
client.send(event_to_json(event))

def generate_event_creator(self) -> Callable[[Id.ENSEMBLE_TYPES], Event]:
def event_builder(status: str) -> Event:
Expand All @@ -226,16 +225,16 @@ async def evaluate(
ce_unary_send_method_name,
partialmethod(
self.__class__.send_event,
self._config.dispatch_uri,
self._config.get_connection_info().push_pull_uri,
token=self._config.token,
cert=self._config.cert,
),
)
await wait_for_evaluator(
base_url=self._config.url,
token=self._config.token,
cert=self._config.cert,
)
# await wait_for_evaluator(
# base_url=self._config.url,
# token=self._config.token,
# cert=self._config.cert,
# )
await self._evaluate_inner(
event_unary_send=getattr(self, ce_unary_send_method_name),
scheduler_queue=scheduler_queue,
Expand Down

0 comments on commit c3bb525

Please sign in to comment.