Code Mantainance
This commit is contained in:
1 parent
328e4f4bf7
commit
10454e47c4
5 files changed
+8
-25
No files matched your search
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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. ')
|
||||
|
||||
Reference in new issue
Block a user