Skip to content

Commit

Permalink
Refresh storage status when simulation is done
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-eq committed Jan 14, 2025
1 parent 54d5cae commit abb616c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ert/gui/ertnotifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def set_current_ensemble(self, ensemble: Ensemble | None = None) -> None:
@Slot(bool)
def set_is_simulation_running(self, is_running: bool) -> None:
self._is_simulation_running = is_running
self.refresh()

def refresh(self) -> None:
print("FORCED REFRESH")
if self._storage is None:
return
self._storage.refresh()
Expand Down
7 changes: 2 additions & 5 deletions src/ert/gui/ertwidgets/ensembleselector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from qtpy.QtWidgets import QComboBox

from ert.gui.ertnotifier import ErtNotifier
from ert.storage.local_ensemble import LocalEnsemble
from ert.storage.realization_storage_state import RealizationStorageState

if TYPE_CHECKING:
Expand Down Expand Up @@ -60,10 +59,8 @@ def __init__(
self.populate()

@property
def selected_ensemble(self) -> Ensemble:
itemData: LocalEnsemble | None = self.itemData(self.currentIndex())
assert itemData is not None
return itemData
def selected_ensemble(self) -> Ensemble | None:
return self.itemData(self.currentIndex())

def populate(self) -> None:
block = self.blockSignals(True)
Expand Down
2 changes: 2 additions & 0 deletions src/ert/storage/local_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ def get_ensemble_state(self) -> list[set[RealizationStorageState]]:
logger.warning(
f"Could not get ensemble state for ensemble ({self.id}) due to invalid experiment ({self.experiment_id}): {self.experiment.error_message}"
)
print("OOF")
return []
print("NO OOF")
response_configs = self.experiment.response_configuration

def _parameters_exist_for_realization(realization: int) -> bool:
Expand Down

0 comments on commit abb616c

Please sign in to comment.