Data Mine Refactoring

This commit is contained in:
Luis Fernando Molina committed 2019-12-26 10:45:35 +01:00
1 parent 21192c971c
commit 56e750b39f
21 files changed
+95 -95

No files matched your search

+4 -4
View File
@@ -49,12 +49,12 @@
}
if (outputDataset.referenceParent.parentNode.parentNode.parentNode !== undefined) {
if (outputDataset.referenceParent.parentNode.parentNode.parentNode.code.codeName === undefined) {
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> codeName at Team not defined. Team = " + JSON.stringify(outputDataset.referenceParent.parentNode.parentNode.parentNode));
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> codeName at Data Mine not defined. Data Mine = " + JSON.stringify(outputDataset.referenceParent.parentNode.parentNode.parentNode));
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return
}
} else {
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> Bot not attached to a Team. Bot = " + JSON.stringify(outputDataset.referenceParent.parentNode.parentNode));
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> Bot not attached to a Data Mine. Bot = " + JSON.stringify(outputDataset.referenceParent.parentNode.parentNode));
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return
}
@@ -76,14 +76,14 @@
/* All good, lets emit the event. */
let devTeam = outputDataset.referenceParent.parentNode.parentNode.parentNode.code.codeName
let dataMine = outputDataset.referenceParent.parentNode.parentNode.parentNode.code.codeName
let botName = outputDataset.referenceParent.parentNode.parentNode.code.codeName
let product = outputDataset.referenceParent.parentNode.code.codeName
let dataset = outputDataset.referenceParent.code.codeName
let statusReport = statusDependencies.reportsByMainUtility.get("Self Reference")
key = devTeam + "-" + botName + "-" + product + "-" + dataset
key = dataMine + "-" + botName + "-" + product + "-" + dataset
let event = {
lastFile: statusReport.file.lastFile
}