Skip to content

Commit

Permalink
Move loggin msg to Scheduler when cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Jan 11, 2024
1 parent a6f93a2 commit dd3a01d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ert/scheduler/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,11 @@ async def _handle_failure(self) -> None:
log_info_from_exit_file(Path(self.real.run_arg.runpath) / ERROR_file)

async def _handle_aborted(self) -> None:
info_msg = "Scheduler cancelled, stopping job"

self.real.run_arg.ensemble_storage.set_failure(
self.real.run_arg.iens, RealizationStorageState.LOAD_FAILURE, info_msg
self.real.run_arg.iens,
RealizationStorageState.LOAD_FAILURE,
"Job cancelled",
)
logger.debug(info_msg)
log_info_from_exit_file(Path(self.real.run_arg.runpath) / ERROR_file)

async def _send(self, state: State) -> None:
Expand Down
1 change: 1 addition & 0 deletions src/ert/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ async def execute(
await self.driver.finish()

if self._cancelled:
logger.debug("scheduler cancelled, stopping jobs...")
return EVTYPE_ENSEMBLE_CANCELLED

return EVTYPE_ENSEMBLE_STOPPED
Expand Down

0 comments on commit dd3a01d

Please sign in to comment.