From: Jérôme Benoit Date: Tue, 7 Nov 2023 20:11:57 +0000 (+0100) Subject: fix(simulator): remove unneeded main thread check at simulator start X-Git-Tag: v1.2.24~38 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a2e0e562686bd9c8d41087e15d10cb62a97a716f;p=e-mobility-charging-stations-simulator.git fix(simulator): remove unneeded main thread check at simulator start Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index f3f6d8b0..4e848c1f 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -4,7 +4,6 @@ import { EventEmitter } from 'node:events'; import { dirname, extname, join } from 'node:path'; import { exit } from 'node:process'; import { fileURLToPath } from 'node:url'; -import { isMainThread } from 'node:worker_threads'; import chalk from 'chalk'; import { availableParallelism } from 'poolifier'; @@ -111,9 +110,6 @@ export class Bootstrap extends EventEmitter { } public async start(): Promise { - if (!isMainThread) { - throw new BaseError('Cannot start charging stations simulator from worker thread'); - } if (this.started === false) { if (this.starting === false) { this.starting = true;