X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FIdTagsCache.ts;h=da4b38bfce79de421343e16f90dd2b6a17e85c6b;hb=ec6dd88b156eac9a14afd0d349ed58bb02fa920e;hp=d1ad32d2bbffe63aa4d091fe11fecce1af0db165;hpb=a974c8e4b8a98c9450be49546a77be0d03e9f512;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/IdTagsCache.ts b/src/charging-station/IdTagsCache.ts index d1ad32d2..da4b38bf 100644 --- a/src/charging-station/IdTagsCache.ts +++ b/src/charging-station/IdTagsCache.ts @@ -1,16 +1,16 @@ import { type FSWatcher, readFileSync } from 'node:fs' -import type { ChargingStation } from './ChargingStation.js' -import { getIdTagsFile } from './Helpers.js' import { FileType, IdTagDistribution } from '../types/index.js' import { handleFileException, isNotEmptyString, - logPrefix, logger, + logPrefix, secureRandom, watchJsonFile } from '../utils/index.js' +import type { ChargingStation } from './ChargingStation.js' +import { getIdTagsFile } from './Helpers.js' interface IdTagsCacheValueType { idTags: string[] @@ -143,8 +143,7 @@ export class IdTagsCache { logger.debug( `${this.logPrefix(file)} ${FileType.Authorization} file have changed, reload` ) - this.deleteIdTagsCache(file) - this.deleteIdTagsCacheIndexes(file) + this.deleteIdTags(file) } catch (error) { handleFileException( file,