refactor: cleanup worker choice strategy options handling
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 24 Jun 2023 18:45:01 +0000 (20:45 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 24 Jun 2023 18:45:01 +0000 (20:45 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/abstract-worker-choice-strategy.ts

index 476c58bc8bcf45f69450adb196e8886abe6f3b88..121647b697139e9c068170d266d96f2c0837edad 100644 (file)
@@ -133,9 +133,8 @@ export abstract class AbstractWorkerChoiceStrategy<
 
   /** @inheritDoc */
   public setOptions (opts: WorkerChoiceStrategyOptions): void {
-    opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
-    this.setTaskStatisticsRequirements(opts)
-    this.opts = opts
+    this.opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
+    this.setTaskStatisticsRequirements(this.opts)
   }
 
   // /**