[ML] Only push live update if job is opened
Original commit: elastic/x-pack-elasticsearch@5318d65012
This commit is contained in:
parent
60a3fbff85
commit
1d660f373f
|
@ -248,7 +248,12 @@ public class JobManager extends AbstractComponent {
|
|||
|
||||
@Override
|
||||
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
|
||||
updateJobProcessNotifier.submitJobUpdate(jobUpdate);
|
||||
PersistentTasksCustomMetaData persistentTasks =
|
||||
newState.metaData().custom(PersistentTasksCustomMetaData.TYPE);
|
||||
JobState jobState = MlMetadata.getJobState(jobId, persistentTasks);
|
||||
if (jobState == JobState.OPENED) {
|
||||
updateJobProcessNotifier.submitJobUpdate(jobUpdate);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue