logging improved

This commit is contained in:
Luis Fernando Molina committed 2020-03-20 11:01:45 +01:00
1 parent e51a74befc
commit 757e646a5c
2 files changed
+11 -9

No files matched your search

+5 -4
View File
@@ -259,8 +259,12 @@ Read the candles and volumes from Exchange Raw Data and produce a file for each
/* Telling the world we are alive and doing well */
let currentDateString = contextVariables.lastCandleFile.getUTCFullYear() + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2);
let currentDate = new Date(contextVariables.lastCandleFile)
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);
}
/*
We prepere the arrays that will accumulate all the information for each output file.
@@ -790,9 +794,6 @@ Read the candles and volumes from Exchange Raw Data and produce a file for each
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);
+6 -5
View File
@@ -418,14 +418,15 @@
return;
}
if (global.areEqualDates(contextVariables.lastCandleFile, new Date()) === false) {
logger.newInternalLoop(bot.codeName, bot.process, contextVariables.lastCandleFile);
}
/* Telling the world we are alive and doing well */
let currentDateString = contextVariables.lastCandleFile.getUTCFullYear() + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2);
let currentDate = new Date(contextVariables.lastCandleFile)
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();