mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user