Skip to content

Commit

Permalink
Removes commented out test code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed Mar 1, 2021
1 parent 0d7fb34 commit 7b1f0b4
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions x-pack/plugins/apm/server/routes/settings/anomaly_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,6 @@ export const createAnomalyDetectionJobsRoute = createRoute({
throw Boom.forbidden(ML_ERRORS.INVALID_LICENSE);
}

// const jobs = await getAnomalyDetectionJobs(setup, context.logger);
// const existingMLJobEnvironments = jobs.map(
// ({ environment }) => environment
// );
// const requestedEnvironmentsWithoutMLJobs = environments.filter(
// (env) => !existingMLJobEnvironments.includes(env)
// );
// if (requestedEnvironmentsWithoutMLJobs.length) {
// await createAnomalyDetectionJobs(
// setup,
// requestedEnvironmentsWithoutMLJobs,
// context.logger
// );
// } else {
// context.logger.warn(
// `ML jobs already exist for environments: ${JSON.stringify(
// environments
// )}`
// );
// }
await createAnomalyDetectionJobs(setup, environments, context.logger);

notifyFeatureUsage({
Expand Down

0 comments on commit 7b1f0b4

Please sign in to comment.