Properly integrate standard JS tools for JS and TS code
[poolifier.git] / src / pools / selection-strategies / less-recently-used-worker-choice-strategy.ts
index 342ca6ebf10fd46274b8f2a78deecd3f1c81be2b..2bfbb15b8e4e6e26235a82900e865bd5a7e570e2 100644 (file)
@@ -27,7 +27,7 @@ export class LessRecentlyUsedWorkerChoiceStrategy<
       const workerRunningTasks = this.pool.getWorkerRunningTasks(
         worker
       ) as number
-      if (this.isDynamicPool === false && workerRunningTasks === 0) {
+      if (!this.isDynamicPool && workerRunningTasks === 0) {
         return worker
       } else if (workerRunningTasks < minNumberOfRunningTasks) {
         lessRecentlyUsedWorker = worker