Bug fixed writting data range

This commit is contained in:
Luis Fernando Molina committed 2019-11-15 10:23:27 +01:00
1 parent 7ea6db1017
commit 5890b62ec2
2 files changed
+11 -15

No files matched your search

+6 -8
View File
@@ -959,21 +959,19 @@
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> writeDataRanges -> Entering function."); }
let productIndex = 0;
productLoopBody();
let outputDatasetIndex = -1;
controlLoop();
function productLoopBody() {
let product = bot.products[productIndex];
writeDataRange(contextVariables.dateBeginOfMarket, bot.multiPeriodProcessDatetime, product, currentOutputPeriodName, controlLoop);
let folderName = bot.processNode.referenceParent.processOutput.outputDatasets[outputDatasetIndex].referenceParent.parentNode.code.codeName;
writeDataRange(contextVariables.dateBeginOfMarket, bot.multiPeriodDailyProcessDatetime, folderName, controlLoop);
}
function controlLoop() {
productIndex++;
outputDatasetIndex++;
if (productIndex < bot.products.length) {
if (outputDatasetIndex < bot.processNode.referenceParent.processOutput.outputDatasets.length) {
productLoopBody();
} else {
callBack(global.DEFAULT_OK_RESPONSE);
+5 -7
View File
@@ -692,21 +692,19 @@
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> writeDataRanges -> Entering function."); }
let productIndex = 0;
productLoopBody();
let outputDatasetIndex = -1;
controlLoop();
function productLoopBody() {
let folderName = bot.products[productIndex].codeName;
let folderName = bot.processNode.referenceParent.processOutput.outputDatasets[outputDatasetIndex].referenceParent.parentNode.code.codeName;
writeDataRange(contextVariables.dateBeginOfMarket, bot.multiPeriodDailyProcessDatetime, folderName, controlLoop);
}
function controlLoop() {
productIndex++;
outputDatasetIndex++;
if (productIndex < bot.products.length) {
if (outputDatasetIndex < bot.processNode.referenceParent.processOutput.outputDatasets.length) {
productLoopBody();
} else {
callBack(global.DEFAULT_OK_RESPONSE);