repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(simulator): silence linter
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ChargingStationWorker.ts
diff --git
a/src/charging-station/ChargingStationWorker.ts
b/src/charging-station/ChargingStationWorker.ts
index 741449e3b63e9b8126e4440c9c143116b61156b7..70d960119901d4a63c037c1032c6310d6c2d1b5c 100644
(file)
--- a/
src/charging-station/ChargingStationWorker.ts
+++ b/
src/charging-station/ChargingStationWorker.ts
@@
-13,7
+13,7
@@
import { WorkerConstants, type WorkerMessage, WorkerMessageEvents } from '../wor
const moduleName = 'ChargingStationWorker';
/**
const moduleName = 'ChargingStationWorker';
/**
- * Create
and start
a charging station instance
+ * Create
s and starts
a charging station instance
*
* @param data - workerData
*/
*
* @param data - workerData
*/
@@
-30,18
+30,16
@@
class ChargingStationWorker extends AsyncResource {
this.runInAsyncScope(
startChargingStation.bind(this) as (data: ChargingStationWorkerData) => void,
this,
this.runInAsyncScope(
startChargingStation.bind(this) as (data: ChargingStationWorkerData) => void,
this,
- message.data
+ message.data
,
);
}
});
}
}
);
}
});
}
}
-export let chargingStationWorker: ChargingStationWorker;
-// Conditionally export ThreadWorker instance for pool usage
-export let threadWorker: ThreadWorker;
+export let chargingStationWorker: ChargingStationWorker | ThreadWorker<ChargingStationWorkerData>;
if (Configuration.workerPoolInUse()) {
if (Configuration.workerPoolInUse()) {
-
thread
Worker = new ThreadWorker<ChargingStationWorkerData>(startChargingStation, {
+
chargingStation
Worker = new ThreadWorker<ChargingStationWorkerData>(startChargingStation, {
maxInactiveTime: WorkerConstants.POOL_MAX_INACTIVE_TIME,
});
} else {
maxInactiveTime: WorkerConstants.POOL_MAX_INACTIVE_TIME,
});
} else {