Skip to content

Commit

Permalink
Reset started event
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 14, 2023
1 parent 9fd4e8d commit 6b5ec33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ert/scheduler/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ async def _execute(self, sem: asyncio.BoundedSemaphore) -> None:
else:
await self._send(State.FAILED)
self.returncode = asyncio.Future()
self.started = asyncio.Event()

except asyncio.CancelledError:
await self._send(State.ABORTING)
Expand All @@ -109,8 +110,9 @@ async def __call__(

for _ in range(max_submit):
await self._execute(sem)
# job has succesfully finished, no need to retry
if self.returncode.done():
# job has succesfully finished or was aborted
# no need to retry
if self.returncode.done() or self.aborted.is_set():
break
else:
message = f"Realization: {self.iens} failed, resubmitting"
Expand Down

0 comments on commit 6b5ec33

Please sign in to comment.