mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
Merge pull request #1353 from daniel-beck/JENKINS-24095
[FIXED JENKINS-24095] Ensure only numExecutors exist when reducing
This commit is contained in:
commit
7fb4591bdc
1 file changed
+9
-2
@@ -729,9 +729,16 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
|
||||
availableNumbers.remove(executor.getNumber());
|
||||
|
||||
for (Integer number : availableNumbers) {
|
||||
Executor e = new Executor(this, number);
|
||||
executors.add(e);
|
||||
/* There may be busy executors with higher index, so only
|
||||
fill up until numExecutors is reached.
|
||||
Extra executors will call removeExecutor(...) and that
|
||||
will create any necessary executors from #0 again. */
|
||||
if (executors.size() < numExecutors) {
|
||||
Executor e = new Executor(this, number);
|
||||
executors.add(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user