Intel Mine code implementation

This commit is contained in:
Luis Fernando Molina committed 2020-11-03 15:08:45 +01:00
1 parent b2ed704745
commit 4ebdb86a6f
3 files changed
+16 -7

No files matched your search

+12 -3
View File
@@ -118,9 +118,18 @@
if (dataMineNode === undefined) {
let tradingMineNode = global.FIND_NODE_IN_NODE_MESH(outputDatasetNode, 'Trading Mine')
if (tradingMineNode === undefined) {
logger.write(MODULE_NAME, "[ERROR] start -> Bot not attached to a Data Mine or a Trading Mine.");
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return
let intelMineNode = global.FIND_NODE_IN_NODE_MESH(outputDatasetNode, 'Intel Mine')
if (intelMineNode === undefined) {
logger.write(MODULE_NAME, "[ERROR] start -> Bot not attached to a Data Mine, Trading Mine or Intel Mine.");
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return
} else {
if (tradingMineNode.config.codeName === undefined) {
logger.write(MODULE_NAME, "[ERROR] start -> Intel Mine witn no codeName defined.");
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return
}
}
} else {
if (tradingMineNode.config.codeName === undefined) {
logger.write(MODULE_NAME, "[ERROR] start -> Trading Mine witn no codeName defined.");
+2 -2
View File
@@ -36,7 +36,7 @@
thisObject.nodeArray = global.FILTER_OUT_NODES_WITHOUT_REFERENCE_PARENT_FROM_NODE_ARRAY(thisObject.nodeArray)
} else {
logger.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> It is not possible to not have process dependencies, which means not data dependencies.");
logger.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> It is not possible not to have process dependencies, which means not data dependencies.");
callBackFunction(global.DEFAULT_OK_RESPONSE)
return
}
@@ -65,7 +65,7 @@
let skipCount = 0
/*
The current nodeArray that we have includes all the dependencies daclared in the Data Mine / Trading Mine
The current nodeArray that we have includes all the dependencies daclared in the Data Mine | Trading Mine | Intel Mine
process dependencies, minus the ones without reference parent, meaning that references Data Mines that are
not present at the workspace. From all the remaining dependencies there will be others that we need to
filter out, and they are the ones which the user does not have a data product anywhere on the network where
+2 -2
View File
@@ -144,11 +144,11 @@
}
if (botNode.parentNode !== undefined) {
if (botNode.parentNode.config.codeName === undefined) {
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> codeName at Data Mine not defined. Data Mine = " + JSON.stringify(botNode.parentNode));
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> codeName at Mine not defined. Mine = " + JSON.stringify(botNode.parentNode));
throw (global.DEFAULT_FAIL_RESPONSE);
}
} else {
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> Bot not attached to a Data Mine or Trading Mine. Bot = " + JSON.stringify(botNode));
logger.write(MODULE_NAME, "[ERROR] raiseEvents -> Bot not attached to a Data Mine | Trading Mine | Intel Mine. Bot = " + JSON.stringify(botNode));
throw (global.DEFAULT_FAIL_RESPONSE);
}
} else {