Skip to content

Commit

Permalink
[ML] Remove unneccessary deletes for datafeed
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Jan 26, 2021
1 parent 7ff5820 commit 1a21c69
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions x-pack/plugins/ml/public/application/services/job_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,6 @@ class JobService {
if (tempDatafeed) {
delete tempDatafeed.datafeed_id;
delete tempDatafeed.job_id;
delete tempDatafeed.state;
delete tempDatafeed.node;
delete tempDatafeed.timing_stats;
delete tempDatafeed.assignment_explanation;

// remove query_delay if it's between 60s and 120s
// the back-end produces a random value between 60 and 120 and so
// by deleting it, the back-end will produce a new random value
if (tempDatafeed.query_delay) {
const interval = parseInterval(tempDatafeed.query_delay);
if (interval !== null) {
const queryDelay = interval.asSeconds();
if (queryDelay > 60 && queryDelay < 120) {
delete tempDatafeed.query_delay;
}
}
}
}
return tempDatafeed;
}
Expand Down

0 comments on commit 1a21c69

Please sign in to comment.