diff --git a/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js b/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js index 3e6293634..1c71d47ef 100644 --- a/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js +++ b/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js @@ -56,6 +56,7 @@ exports.newSuperalgosBotModulesFetchingProcess = function (processIndex) { } thisReport = statusDependencies.statusReports.get(reportKey) + contextVariables.beginingOfMarket = thisReport.file.beginingOfMarket } catch (err) { TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).UNEXPECTED_ERROR = err @@ -837,7 +838,8 @@ exports.newSuperalgosBotModulesFetchingProcess = function (processIndex) { thisReport.file = { lastRun: (new Date()).toISOString(), lastPage: lastPage, - lastFile: contextVariables.lastFile.toISOString() + lastFile: contextVariables.lastFile.toISOString(), + beginingOfMarket: contextVariables.beginingOfMarket } if (thisReport.file.beginingOfMarket === undefined) { diff --git a/Projects/Superalgos/TS/Function-Libraries/DataAggregationFunctions.js b/Projects/Superalgos/TS/Function-Libraries/DataAggregationFunctions.js index f83cfeab1..764a499c1 100644 --- a/Projects/Superalgos/TS/Function-Libraries/DataAggregationFunctions.js +++ b/Projects/Superalgos/TS/Function-Libraries/DataAggregationFunctions.js @@ -185,7 +185,6 @@ exports.newSuperalgosFunctionLibrariesDataAggregationFunctions = function () { We get in here when the report already exists, meaning that this process has succesfully ran before at least once. */ - contextVariables.beginingOfMarket = new Date(thisReport.beginingOfMarket) if (contextVariables.beginingOfMarket.valueOf() !== contextVariables.datetimeBeginingOfMarketFile.valueOf()) { // Reset Mechanism for Begining of the Market