Skip to content

Commit bb05b6b

Browse files
committed
fix: Tasks never get removed from the ExecutorState if an UnrecoverableTaskException is raised
1 parent f0b2839 commit bb05b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DIRAC/Core/Utilities/ExecutorDispatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,14 +826,14 @@ def __sendTaskToExecutor(self, eId, eTypes=False, checkIdle=False):
826826
self.__msgTaskToExecutor(taskId, eId, eType)
827827
except UnrecoverableTaskException as e:
828828
self.__log.exception("Failed to call __msgTaskToExecutor for", taskId)
829+
self.__states.removeTask(taskId)
829830
return S_ERROR(str(e))
830831
except Exception:
831832
self.__log.exception("Exception while sending task to executor")
832833
self.__queues.pushTask(eType, taskId, ahead=False)
833834
self.__states.removeTask(taskId)
834835
return S_ERROR("Exception while sending task to executor")
835-
else:
836-
return S_OK(taskId)
836+
return S_OK(taskId)
837837

838838
def __msgTaskToExecutor(self, taskId, eId, eType):
839839
try:

0 commit comments

Comments
 (0)