Rename Wrk -> WorkerAbstract
[e-mobility-charging-stations-simulator.git] / src / charging-station / AutomaticTransactionGenerator.ts
index 929927541d502d7670ce57000c1eb76e821d39dc..763533ed82e12269cb56183708bf0ae7720ab6a0 100644 (file)
@@ -27,6 +27,7 @@ export default class AutomaticTransactionGenerator {
     this.timeToStop = false;
     if (this.chargingStation.stationInfo.AutomaticTransactionGenerator.stopAfterHours &&
       this.chargingStation.stationInfo.AutomaticTransactionGenerator.stopAfterHours > 0) {
+      // eslint-disable-next-line @typescript-eslint/no-misused-promises
       setTimeout(async (): Promise<void> => {
         await this.stop();
       }, this.chargingStation.stationInfo.AutomaticTransactionGenerator.stopAfterHours * 3600 * 1000);
@@ -73,7 +74,7 @@ export default class AutomaticTransactionGenerator {
       if (!this.chargingStation?.ocppRequestService) {
         logger.info(`${this.logPrefix(connectorId)} Transaction loop waiting for charging station service to be initialized`);
         do {
-          await Utils.sleep(500);
+          await Utils.sleep(Constants.CHARGING_STATION_ATG_INITIALIZATION_TIME);
         } while (!this.chargingStation?.ocppRequestService);
       }
       const wait = Utils.getRandomInt(this.chargingStation.stationInfo.AutomaticTransactionGenerator.maxDelayBetweenTwoTransactions,