Skip to content

Commit

Permalink
Wait for server to start before connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Feb 26, 2025
1 parent 8b4ae2f commit 9ee24d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/everest/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from ert.run_models.event import StatusEvents, status_event_from_json
from ert.run_models.everest_run_model import EverestRunModel, logger
from everest.config import EverestConfig, ServerConfig
from everest.detached import _query_server
from everest.detached import _query_server, wait_for_server
from everest.strings import OPT_PROGRESS_ENDPOINT


Expand Down Expand Up @@ -64,6 +64,7 @@ def _connect_to_events_endpoint(
) -> queue.SimpleQueue[StatusEvents]:
# Connect to websockets endpoint and create a queue from it, then
# pass it in, should function the same.
wait_for_server(output_dir, 60)
server_context = ServerConfig.get_server_context(output_dir)
url, cert, auth = server_context
opt_endpoint = "/".join([url, OPT_PROGRESS_ENDPOINT])
Expand Down

0 comments on commit 9ee24d6

Please sign in to comment.