diff --git a/IndicatorBotProcessMainLoop.js b/IndicatorBotProcessMainLoop.js index abc233a36..95f453280 100644 --- a/IndicatorBotProcessMainLoop.js +++ b/IndicatorBotProcessMainLoop.js @@ -25,18 +25,16 @@ }; let processConfig; - let UI_COMMANDS; return thisObject; - function initialize(pUI_COMMANDS, pProcessConfig, callBackFunction) { + function initialize(pProcessConfig, callBackFunction) { /* This function is exactly the same in the 3 modules representing the 2 different bot types loops. */ try { if (FULL_LOG === true) { parentLogger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); } - UI_COMMANDS = pUI_COMMANDS; processConfig = pProcessConfig; let filePath = bot.devTeam + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name diff --git a/Root.js b/Root.js index b160dbba1..6c1fdbbdb 100644 --- a/Root.js +++ b/Root.js @@ -46,11 +46,10 @@ const FULL_LOG = true; let logDisplace = "Task Server" + " "; - let UI_COMMANDS; return thisObject; - function initialize(pUI_COMMANDS, callBackFunction) { + function initialize(callBackFunction) { try { console.log(logDisplace + "Root : [INFO] initialize -> Entering function. "); @@ -95,8 +94,6 @@ } }; - UI_COMMANDS = pUI_COMMANDS; - callBackFunction(); } @@ -428,7 +425,7 @@ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> findProcess -> runSensorBot -> pYear = " + pYear); } let extractionBotMainLoop = SENSOR_BOT_MAIN_LOOP_MODULE.newSensorBotProcessMainLoop(pBotConfig, logger); - extractionBotMainLoop.initialize(UI_COMMANDS, pProcessConfig, onInitializeReady); + extractionBotMainLoop.initialize(pProcessConfig, onInitializeReady); function onInitializeReady(err) { @@ -502,7 +499,7 @@ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> findProcess -> runIndicatorBot -> pYear = " + pYear); } let indicatorBotMainLoop = INDICATOR_BOT_MAIN_LOOP_MODULE.newIndicatorBotProcessMainLoop(pBotConfig, logger); - indicatorBotMainLoop.initialize(UI_COMMANDS, pProcessConfig, onInitializeReady); + indicatorBotMainLoop.initialize(pProcessConfig, onInitializeReady); function onInitializeReady(err) { @@ -571,7 +568,7 @@ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> findProcess -> runTradingEngine -> Entering function."); } let tradingEngineMainLoop = TRADING_ENGINE_MAIN_LOOP_MODULE.newTradingEngineProcessMainLoop(pBotConfig, logger); - tradingEngineMainLoop.initialize(UI_COMMANDS, pProcessConfig, onInitializeReady); + tradingEngineMainLoop.initialize(pProcessConfig, onInitializeReady); function onInitializeReady(err) { diff --git a/SensorBotProcessMainLoop.js b/SensorBotProcessMainLoop.js index b3307aba0..8360236c6 100644 --- a/SensorBotProcessMainLoop.js +++ b/SensorBotProcessMainLoop.js @@ -23,18 +23,16 @@ }; let processConfig; - let UI_COMMANDS; return thisObject; - function initialize(pUI_COMMANDS, pProcessConfig, callBackFunction) { + function initialize(pProcessConfig, callBackFunction) { /* This function is exactly the same in the 3 modules representing the 2 different bot types loops. */ try { if (FULL_LOG === true) { parentLogger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); } - UI_COMMANDS = pUI_COMMANDS; processConfig = pProcessConfig; let filePath = bot.devTeam + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name; diff --git a/TradingEngineProcessMainLoop.js b/TradingEngineProcessMainLoop.js index e41ebff71..f99b02df4 100644 --- a/TradingEngineProcessMainLoop.js +++ b/TradingEngineProcessMainLoop.js @@ -27,18 +27,16 @@ }; let processConfig; - let UI_COMMANDS; return thisObject; - function initialize(pUI_COMMANDS, pProcessConfig, callBackFunction) { + function initialize(pProcessConfig, callBackFunction) { /* This function is exactly the same in the 3 modules representing the 2 different bot types loops. */ try { if (FULL_LOG === true) { parentLogger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); } - UI_COMMANDS = pUI_COMMANDS; processConfig = pProcessConfig; let filePath = bot.devTeam + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name diff --git a/server.js b/server.js index 940984e45..b0f32d97b 100644 --- a/server.js +++ b/server.js @@ -370,15 +370,7 @@ function startRoot(processIndex) { const ROOT_MODULE = require(ROOT_DIR + 'Root') let root = ROOT_MODULE.newRoot() - let UI_COMMANDS = { - beginDatetime: undefined, - endDatetime: undefined, - timePeriod: undefined, - startMode: undefined, - eventHandler: undefined - } - - root.initialize(UI_COMMANDS, onInitialized) + root.initialize(onInitialized) function onInitialized() { console.log('[INFO] Task Server -> server -> startRoot -> onInitialized -> Entering function. ')