From 73705988e2448ac96150bb851fa36d059ee40c17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 24 Jan 2021 22:12:13 +0100 Subject: [PATCH] Move workers handling code in its own directory. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/start.ts | 8 ++++---- src/{charging-station => worker}/Worker.ts | 0 src/{charging-station => worker}/WorkerGroup.ts | 0 src/{charging-station => worker}/WorkerPool.ts | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename src/{charging-station => worker}/Worker.ts (100%) rename src/{charging-station => worker}/WorkerGroup.ts (100%) rename src/{charging-station => worker}/WorkerPool.ts (100%) 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 -- 2.34.1