How to use the ml.max_open_jobs function in ml

To help you get started, we’ve selected a few ml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / x-pack / legacy / plugins / ml / server / routes / system.js View on Github external
Object.keys(resp.nodes).forEach((k) => {
            if (resp.nodes[k].attributes !== undefined) {
              const maxOpenJobs = resp.nodes[k].attributes['ml.max_open_jobs'];
              if (maxOpenJobs !== null && maxOpenJobs > 0) {
                count++;
              }
            }
          });
        }