Skip to content

Commit

Permalink
Set retry=False immediatelly
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 11, 2023
1 parent d7b24fc commit b20da3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ert/scheduler/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async def __call__(
retries = 0
retry: bool = True
while retry:
retry = False
await sem.acquire()
try:
await self._send(State.SUBMITTING)
Expand All @@ -87,14 +88,12 @@ async def __call__(
== LoadStatus.LOAD_SUCCESSFUL
):
await self._send(State.COMPLETED)
retry = False
else:
await self._send(State.FAILED)
retries += 1
retry = retries < self._scheduler._max_submit

except asyncio.CancelledError:
retry = False
await self._send(State.ABORTING)
await self.driver.kill(self.iens)

Expand Down

0 comments on commit b20da3e

Please sign in to comment.