提交 eb4aa589 编写于 作者: R Ryan Campbell

When calculating idle executors, only include Computers which are accepting tasks.

上级 85019c46
...@@ -167,7 +167,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl ...@@ -167,7 +167,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl
public int getIdleExecutors() { public int getIdleExecutors() {
int r=0; int r=0;
for (Computer c : get_all()) for (Computer c : get_all())
if(c.isOnline() || c.isConnecting()) if((c.isOnline() || c.isConnecting()) && c.isAcceptingTasks())
r += c.countIdle(); r += c.countIdle();
return r; return r;
} }
......
...@@ -276,7 +276,7 @@ public abstract class Label extends Actionable implements Comparable<Label>, Mod ...@@ -276,7 +276,7 @@ public abstract class Label extends Actionable implements Comparable<Label>, Mod
int r=0; int r=0;
for (Node n : getNodes()) { for (Node n : getNodes()) {
Computer c = n.toComputer(); Computer c = n.toComputer();
if(c!=null && (c.isOnline() || c.isConnecting())) if(c!=null && (c.isOnline() || c.isConnecting()) && c.isAcceptingTasks())
r += c.countIdle(); r += c.countIdle();
} }
return r; return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册