Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
}
public start(): void {
+ if (this.started) {
+ logger.error(`${this.logPrefix()} trying to start while already started`);
+ return;
+ }
const previousRunDuration = (this?.startDate && this?.lastRunDate) ? (this.lastRunDate.getTime() - this.startDate.getTime()) : 0;
this.startDate = new Date();
this.lastRunDate = this.startDate;
private startStationTemplateFileMonitoring(): void {
try {
- fs.watch(this.stationTemplateFile, async (event, filename): Promise<void> => {
+ fs.watch(this.stationTemplateFile, (event, filename): void => {
if (filename && event === 'change') {
try {
logger.debug(this.logPrefix() + ' Template file ' + this.stationTemplateFile + ' have changed, reload');