[ML] Stop immediately when job isn't opened
Original commit: elastic/x-pack-elasticsearch@cdb4cf47f50bcaf29dcebbe3a9806fa48d077faf
@@ -69,6 +69,7 @@ public abstract class TransportJobTaskAction<OperationTask extends OpenJobAction
String message = "Cannot perform requested action because job [" + resolvedJobId
+ "] is not open";
listener.onFailure(ExceptionsHelper.conflictStatusException(message));
+ return;
} else {
executorNodes.add(jobTask.getExecutorNode());
}
