refactoring

This commit is contained in:
Luis Fernando Molina committed 2020-01-21 14:44:47 +01:00
1 parent c1c732e4bf
commit cc0dccc9de
2 files changed
+19 -19

No files matched your search

+3 -3
View File
@@ -208,10 +208,10 @@
/* Simplifying the access to basic info */
botConfig.dataMine = global.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.code.codeName
botConfig.exchange = global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.parentNode.parentNode.code.codeName
botConfig.exchange = global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode.parentNode.code.codeName
botConfig.market = {
baseAsset: global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.baseAsset.referenceParent.code.codeName,
quotedAsset: global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.quotedAsset.referenceParent.code.codeName
baseAsset: global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.baseAsset.referenceParent.code.codeName,
quotedAsset: global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.quotedAsset.referenceParent.code.codeName
}
/* This stuff is still hardcoded and unresolved. */
+16 -16
View File
@@ -175,43 +175,43 @@ function bootLoader() {
/* Validate that the minimun amount of input required are defined. */
if (global.TASK_NODE.bot.processes[processIndex].marketInstance === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Process Instance without a Market Instance. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex]));
if (global.TASK_NODE.bot.processes[processIndex].marketReference === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Process Instance without a Market Reference. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex]));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market Instance without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market Reference without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.parentNode === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.parentNode.parentNode === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Exchange Markets without a Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.parentNode));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode.parentNode === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Exchange Markets without a Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.baseAsset === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Base Asset. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.baseAsset === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Base Asset. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.quotedAsset === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Quoted Asset. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.quotedAsset === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Market without a Quoted Asset. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.baseAsset.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Base Asset without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.baseAsset));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.baseAsset.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Base Asset without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.baseAsset));
continue
}
if (global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.quotedAsset.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Quoted Asset without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketInstance.referenceParent.quotedAsset));
if (global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.quotedAsset.referenceParent === undefined) {
console.log("[WARN] Task Server -> server -> bootLoader -> Quoted Asset without a Reference Parent. This process will not be executed. -> Process Instance = " + JSON.stringify(global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.quotedAsset));
continue
}