X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FUtils.ts;h=02164b1d3be956ec4edb9e1a537d624ba7b725bf;hb=059f35a55515a998352f621e40a1e35bd22b424d;hp=16cb7fa3fca34cd39f803607ec6b70fb3f8dfa78;hpb=17991e8cf5f39801cdba8bd4682576c40e62dc4d;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 16cb7fa3..02164b1d 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -1,4 +1,6 @@ +import Configuration from './Configuration'; import { WebSocketCloseEventStatusString } from '../types/WebSocket'; +import { WorkerProcessType } from '../types/Worker'; import { v4 as uuid } from 'uuid'; export default class Utils { @@ -209,4 +211,12 @@ export default class Utils { } return '(Unknown)'; } + + static workerPoolInUse(): boolean { + return Configuration.getWorkerProcess() === WorkerProcessType.DYNAMIC_POOL || Configuration.getWorkerProcess() === WorkerProcessType.STATIC_POOL; + } + + static workerDynamicPoolInUse(): boolean { + return Configuration.getWorkerProcess() === WorkerProcessType.DYNAMIC_POOL; + } }