13880b2f81dd8f16c99a97f26949bc44c51f8be6
1 import Configuration from
'../utils/Configuration';
2 import WorkerPool from
'./WorkerPool';
3 import WorkerSet from
'./WorkerSet';
4 import Wrk from
'./Worker';
6 export default class WorkerFactory
{
7 public static getWorkerImpl(workerScript
: string): Wrk
{
8 if (Configuration
.useWorkerPool()) {
9 return new WorkerPool(workerScript
);
11 return new WorkerSet(workerScript
, Configuration
.getChargingStationsPerWorker());