logging improved

This commit is contained in:
Luis Fernando Molina committed 2020-03-20 11:02:37 +01:00
1 parent 5fc682cf96
commit fdd25e56a0
1 file changed
+6 -4
+6 -4
View File
@@ -288,7 +288,12 @@
/* Telling the world we are alive and doing well */
let currentDateString = processDate.getUTCFullYear() + '-' + utilities.pad(processDate.getUTCMonth() + 1, 2) + '-' + utilities.pad(processDate.getUTCDate(), 2);
let currentDate = new Date(processDate)
bot.processHeartBeat(currentDateString, global.getPercentage(fromDate, currentDate, lastDate))
let percentage = global.getPercentage(fromDate, currentDate, lastDate)
bot.processHeartBeat(currentDateString, percentage)
if (global.areEqualDates(currentDate, new Date()) === false) {
logger.newInternalLoop(bot.codeName, bot.process, currentDate, percentage);
}
periodsLoop();
@@ -1627,9 +1632,6 @@
thisReport.file.beginingOfMarket = beginingOfMarket.toUTCString()
thisReport.save(callBack);
if (global.areEqualDates(lastFileDate, new Date()) === false) {
logger.newInternalLoop(bot.codeName, bot.process, lastFileDate);
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = " + err.stack);