From: Jérôme Benoit Date: Sun, 24 Jan 2021 21:12:13 +0000 (+0100) Subject: Move workers handling code in its own directory. X-Git-Tag: v1.0.1-0~119 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=73705988e2448ac96150bb851fa36d059ee40c17;p=e-mobility-charging-stations-simulator.git Move workers handling code in its own directory. Signed-off-by: Jérôme Benoit --- diff --git a/src/start.ts b/src/start.ts index f316d0ad..591ef96f 100644 --- a/src/start.ts +++ b/src/start.ts @@ -2,8 +2,8 @@ import Configuration from './utils/Configuration'; import Constants from './utils/Constants'; import Utils from './utils/Utils'; import WorkerData from './types/WorkerData'; -import WorkerGroup from './charging-station/WorkerGroup'; -import WorkerPool from './charging-station/WorkerPool'; +import WorkerGroup from './worker/WorkerGroup'; +import WorkerPool from './worker/WorkerPool'; class Bootstrap { static async start() { @@ -61,9 +61,9 @@ class Bootstrap { if (numStationsTotal === 0) { console.log('No charging station template enabled in configuration, exiting'); } else if (Configuration.useWorkerPool()) { - console.log('Charging station simulator started with ' + numStationsTotal.toString() + ' charging station(s) and ' + numConcurrentWorkers.toString() + '/' + Configuration.getWorkerPoolMaxSize().toString() + ' worker(s) concurrently running'); + console.log(`Charging station simulator started with ${numStationsTotal.toString()} charging station(s) and ${numConcurrentWorkers.toString()}/${Configuration.getWorkerPoolMaxSize().toString()} worker(s) concurrently running`); } else { - console.log('Charging station simulator started with ' + numStationsTotal.toString() + ' charging station(s) and ' + numConcurrentWorkers.toString() + ' worker(s) concurrently running'); + console.log(`Charging station simulator started with ${numStationsTotal.toString()} charging station(s) and ${numConcurrentWorkers.toString()} worker(s) concurrently running (${chargingStationsPerWorker} charging station(s) per worker)`); } } catch (error) { // eslint-disable-next-line no-console diff --git a/src/charging-station/Worker.ts b/src/worker/Worker.ts similarity index 100% rename from src/charging-station/Worker.ts rename to src/worker/Worker.ts diff --git a/src/charging-station/WorkerGroup.ts b/src/worker/WorkerGroup.ts similarity index 100% rename from src/charging-station/WorkerGroup.ts rename to src/worker/WorkerGroup.ts diff --git a/src/charging-station/WorkerPool.ts b/src/worker/WorkerPool.ts similarity index 100% rename from src/charging-station/WorkerPool.ts rename to src/worker/WorkerPool.ts