X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPRequestService.ts;h=e00e2b99f9a2bbbddbdca10a6ae1427ffe982d2c;hb=5e3cb7281de2b6fa8b61a453f964c2f213fefa80;hp=25c8943564a7f91afc639c22a7f99a0a28d247d9;hpb=a38bc3151612c4fcbd108be125a2e75ef6682810;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 25c89435..e00e2b99 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -1,3 +1,5 @@ +import { parentPort } from 'worker_threads'; + import type { JSONSchemaType } from 'ajv'; import Ajv from 'ajv-draft-04'; import ajvFormats from 'ajv-formats'; @@ -21,6 +23,7 @@ import Constants from '../../utils/Constants'; import logger from '../../utils/Logger'; import Utils from '../../utils/Utils'; import type ChargingStation from '../ChargingStation'; +import { MessageChannelUtils } from '../MessageChannelUtils'; import type OCPPResponseService from './OCPPResponseService'; import { OCPPServiceUtils } from './OCPPServiceUtils'; @@ -251,6 +254,7 @@ export default abstract class OCPPRequestService { reject(error); } finally { chargingStation.requests.delete(messageId); + // parentPort.postMessage(MessageChannelUtils.buildUpdatedMessage(chargingStation)); } } @@ -274,6 +278,7 @@ export default abstract class OCPPRequestService { error ); chargingStation.requests.delete(messageId); + // parentPort.postMessage(MessageChannelUtils.buildUpdatedMessage(chargingStation)); reject(error); } }),