Per worker max number of elements is not relevant on pool
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 8 Mar 2021 14:18:36 +0000 (15:18 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 8 Mar 2021 14:18:36 +0000 (15:18 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts
src/worker/WorkerDynamicPool.ts
src/worker/WorkerStaticPool.ts

index 297c0870a14a2e9a44cd7dbb5c49139e241dafcb..6770f7bba47079a803bfc5d64377109c3f6e405c 100644 (file)
@@ -53,7 +53,7 @@ export default class Bootstrap {
         if (numStationsTotal === 0) {
           console.log('No charging station template enabled in configuration, exiting');
         } else {
-          console.log(`Charging station simulator started with ${numStationsTotal.toString()} charging station(s) and ${Utils.workerDynamicPoolInUse() ? `${Configuration.getWorkerPoolMinSize().toString()}/` : ''}${this.getWorkerImplementationInstance().size}${Utils.workerPoolInUse() ? `/${Configuration.getWorkerPoolMaxSize().toString()}` : ''} worker(s) concurrently running in '${Configuration.getWorkerProcess()}' mode (${this.getWorkerImplementationInstance().maxElementsPerWorker} charging station(s) per worker)`);
+          console.log(`Charging station simulator started with ${numStationsTotal.toString()} charging station(s) and ${Utils.workerDynamicPoolInUse() ? `${Configuration.getWorkerPoolMinSize().toString()}/` : ''}${this.getWorkerImplementationInstance().size}${Utils.workerPoolInUse() ? `/${Configuration.getWorkerPoolMaxSize().toString()}` : ''} worker(s) concurrently running in '${Configuration.getWorkerProcess()}' mode${this.getWorkerImplementationInstance().maxElementsPerWorker ? ` (${this.getWorkerImplementationInstance().maxElementsPerWorker} charging station(s) per worker)` : ''}`);
         }
         this.started = true;
       } catch (error) {
index e6b939d8b384f754d747b038d74b22d2f533e2b9..339aebcace72c63dce0472389664594b1100793b 100644 (file)
@@ -24,7 +24,7 @@ export default class WorkerDynamicPool<T> extends WorkerAbstract {
   }
 
   get maxElementsPerWorker(): number {
-    return 1;
+    return null;
   }
 
   /**
index 8e591948ba362fee9d7f63d45a2c3640808e7bee..ab8e309f208f4655ff0ba6acb96929fea12c8d3d 100644 (file)
@@ -24,7 +24,7 @@ export default class WorkerStaticPool<T> extends WorkerAbstract {
   }
 
   get maxElementsPerWorker(): number {
-    return 1;
+    return null;
   }
 
   /**