/** * Returns the number of {@link Executor}s that are doing some work right now. */ public final int countBusy() { return countExecutors()-countIdle(); }
/** * {@code getTotalExecutors()-getBusyExecutors()}, plus executors that are being brought online. */ public int getIdleExecutors() { int r=0; for (Computer c : get_all()) if((c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) r += c.countIdle(); return r; }
/** * Number of idle {@link Executor}s that can start working immediately. */ @Exported public int getIdleExecutors() { int r=0; for (Node n : getNodes()) { Computer c = n.toComputer(); if(c!=null && (c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) r += c.countIdle(); } return r; }
@Override public int computeIdleExecutors() { int r=0; for (Computer c : Jenkins.getInstance().getComputers()) { Node node = c.getNode(); if (node != null && node.getMode() == Mode.NORMAL && (c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) { r += c.countIdle(); } } return r; }
for (Computer o : Jenkins.get().getComputers()) { if ((o.isOnline() || o.isConnecting()) && o.isPartiallyIdle() && o.isAcceptingTasks()) { final int idleExecutors = o.countIdle(); if (idleExecutors>0) availableComputers.put(o, idleExecutors);
/** * @since 2.1.0 */ public int getIdleCount() { return countIdle(); }
/** * @since 2.1.0 */ public int getIdleCount() { return countIdle(); }
/** * @since 2.1.0 */ public int getIdleCount() { return countIdle(); }
/** * @since 2.1.0 */ public int getIdleCount() { return countIdle(); }
/** * Returns the number of {@link Executor}s that are doing some work right now. */ public final int countBusy() { return countExecutors()-countIdle(); }
/** * Returns the number of {@link Executor}s that are doing some work right now. */ public final int countBusy() { return countExecutors()-countIdle(); }
/** * Returns the number of {@link Executor}s that are doing some work right now. */ public final int countBusy() { return countExecutors()-countIdle(); }
/** * Returns the number of {@link Executor}s that are doing some work right now. */ public final int countBusy() { return countExecutors()-countIdle(); }
/** * Returns the number of {@link Executor}s that are doing some work right * now. */ public final int countBusy() { return countExecutors() - countIdle(); }
/** * {@code getTotalExecutors()-getBusyExecutors()}, plus executors that are being brought online. */ public int getIdleExecutors() { int r=0; for (Computer c : get_all()) if(c.isOnline() || c.isConnecting()) r += c.countIdle(); return r; }
/** * {@code getTotalExecutors()-getBusyExecutors()}, plus executors that are being brought online. */ public int getIdleExecutors() { int r=0; for (Computer c : get_all()) if(c.isOnline() || c.isConnecting()) r += c.countIdle(); return r; }
/** * {@code getTotalExecutors()-getBusyExecutors()}, plus executors that are being brought online. */ public int getIdleExecutors() { int r=0; for (Computer c : get_all()) if(c.isOnline() || c.isConnecting()) r += c.countIdle(); return r; }
/** * {@code getTotalExecutors()-getBusyExecutors()}, plus executors that are being brought online. */ public int getIdleExecutors() { int r=0; for (Computer c : get_all()) if((c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) r += c.countIdle(); return r; }
/** * Number of idle {@link Executor}s that can start working immediately. */ @Exported public int getIdleExecutors() { int r=0; for (Node n : getNodes()) { Computer c = n.toComputer(); if(c!=null && (c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) r += c.countIdle(); } return r; }
@Override public int computeIdleExecutors() { int r=0; for (Computer c : Jenkins.getInstance().getComputers()) { Node node = c.getNode(); if (node != null && node.getMode() == Mode.NORMAL && (c.isOnline() || c.isConnecting()) && c.isAcceptingTasks()) { r += c.countIdle(); } } return r; }