refactor: cleanup worker choice strategies options namespace
[poolifier.git] / src / pools / abstract-pool.ts
index 482a20db4fc044d0f118b6d7ae2cc9f5af962de9..41b23a8c86fc2ebd55a8fe140c620137956df9df 100644 (file)
@@ -255,19 +255,19 @@ export abstract class AbstractPool<
       )
     }
     if (
-      workerChoiceStrategyOptions.choiceRetries != null &&
-      !Number.isSafeInteger(workerChoiceStrategyOptions.choiceRetries)
+      workerChoiceStrategyOptions.retries != null &&
+      !Number.isSafeInteger(workerChoiceStrategyOptions.retries)
     ) {
       throw new TypeError(
-        'Invalid worker choice strategy options: choice retries must be an integer'
+        'Invalid worker choice strategy options: retries must be an integer'
       )
     }
     if (
-      workerChoiceStrategyOptions.choiceRetries != null &&
-      workerChoiceStrategyOptions.choiceRetries < 0
+      workerChoiceStrategyOptions.retries != null &&
+      workerChoiceStrategyOptions.retries < 0
     ) {
       throw new RangeError(
-        `Invalid worker choice strategy options: choice retries '${workerChoiceStrategyOptions.choiceRetries}' must be greater or equal than zero`
+        `Invalid worker choice strategy options: retries '${workerChoiceStrategyOptions.retries}' must be greater or equal than zero`
       )
     }
     if (