fix(worker): worker execution result (#2616)

* fix(core, jdbc, runner-memory): set Executable taskrun to RUNNING earlier

Or RUNNING will be set when the subflow is RUNNING and when it is terminated erasing previous RUNNING start date.

* fix(core): avoid duplicate state change in the Flow task
This commit is contained in:
Loïc Mathieu
2023-11-30 21:09:32 +01:00
committed by GitHub
parent e091cf7ce9
commit fca0030f0f
5 changed files with 15 additions and 12 deletions

View File

@@ -237,7 +237,7 @@ public class MemoryExecutor implements ExecutorInterface {
// send a running worker task result to track running vs created status
if (workerTaskExecution.getTask().waitForExecution()) {
sendWorkerTaskResultForWorkerTaskExecution(execution, workerTaskExecution, workerTaskExecution.getTaskRun().withState(State.Type.RUNNING));
sendWorkerTaskResultForWorkerTaskExecution(execution, workerTaskExecution, workerTaskExecution.getTaskRun());
}
});
}
@@ -259,7 +259,7 @@ public class MemoryExecutor implements ExecutorInterface {
// If we didn't wait for the flow execution, the worker task execution has already been created by the Executor service.
if (workerTaskExecution.getTask().waitForExecution()) {
sendWorkerTaskResultForWorkerTaskExecution(execution, workerTaskExecution, workerTaskExecution.getTaskRun().withState(State.Type.RUNNING).withState(execution.getState().getCurrent()));
sendWorkerTaskResultForWorkerTaskExecution(execution, workerTaskExecution, workerTaskExecution.getTaskRun().withState(execution.getState().getCurrent()));
}
WORKERTASKEXECUTIONS_WATCHER.remove(execution.getId());