mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
no need to do this inside the loop, although not that it hurts
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9399 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
0cf3e83a52
commit
fc0f23c017
1 file changed
+2
-1
@@ -21,9 +21,10 @@ public class SlaveReconnectionWork extends SafeTimerTask {
|
||||
private final Map<Slave, Long> nextCheck = new WeakHashMap<Slave, Long>();
|
||||
|
||||
protected void doRun() {
|
||||
final Queue queue = Hudson.getInstance().getQueue();
|
||||
|
||||
for (Slave s : Hudson.getInstance().getSlaves()) {
|
||||
if (!nextCheck.containsKey(s) || System.currentTimeMillis() > nextCheck.get(s)) {
|
||||
final Queue queue = Hudson.getInstance().getQueue();
|
||||
boolean hasJob = false;
|
||||
for (Executor exec: s.getComputer().getExecutors()) {
|
||||
if (!exec.isIdle()) {
|
||||
|
||||
Reference in new issue
Block a user