Skip to content

Commit

Permalink
Fix logic in WorkerService
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgunter authored Feb 12, 2024
1 parent 5adaf62 commit bad21b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolea
if (executorServiceMaxPoolSize != null) {
try {
// we are getting errors if we go beyond 10?
executorServiceMaxPoolSize = Math.max(10, executorServiceMaxPoolSize);
executorServiceMaxPoolSize = Math.min(10, executorServiceMaxPoolSize);
// Log information about JMX remote interface
if (System.getProperty("com.sun.management.jmxremote") == null) {
log.warn("JMX remote appears to be disabled");
Expand All @@ -923,7 +923,7 @@ public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolea
// Through experimentation, we have seen that the max doesn't get reached, but
// its the core size that counts.
//
Attribute attr2 = new Attribute("CorePoolSize", 10);
Attribute attr2 = new Attribute("CorePoolSize", executorServiceMaxPoolSize);
mbsc.setAttribute(serviceName, attr2);

// Also set the MaximumPoolSize
Expand Down

0 comments on commit bad21b0

Please sign in to comment.