diff --git a/.vs/AAOlivia-Indicator-Bot/v15/.suo b/.vs/AAOlivia-Indicator-Bot/v15/.suo index 782f96eaf..0fc887645 100644 Binary files a/.vs/AAOlivia-Indicator-Bot/v15/.suo and b/.vs/AAOlivia-Indicator-Bot/v15/.suo differ diff --git a/Multi-Period-Daily/User.bot.js b/Multi-Period-Daily/User.bot.js index beadcdfb5..e60bc70c2 100644 --- a/Multi-Period-Daily/User.bot.js +++ b/Multi-Period-Daily/User.bot.js @@ -37,11 +37,11 @@ let utilities = UTILITIES.newUtilities(bot); - let dependencies; + let statusDependencies; return thisObject; - function initialize(pDependencies, pMonth, pYear, callBackFunction) { + function initialize(pStatusDependencies, pMonth, pYear, callBackFunction) { try { @@ -49,7 +49,7 @@ if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } - dependencies = pDependencies; + statusDependencies = pStatusDependencies; commons.initializeStorage(oliviaStorage, bruceStorage, onInizialized); @@ -110,13 +110,13 @@ Read the candles and volumes from Bruce and produce a file for each day and for reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Historic-Trades" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); callBackFunction(global.DEFAULT_RETRY_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); @@ -136,13 +136,13 @@ Read the candles and volumes from Bruce and produce a file for each day and for reportKey = "AAMasters" + "-" + "AABruce" + "-" + "One-Min-Daily-Candles-Volumes" + "-" + "dataSet.V1" + "-" + bot.processDatetime.getUTCFullYear() + "-" + utilities.pad(bot.processDatetime.getUTCMonth() + 1,2); if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); callBackFunction(global.DEFAULT_RETRY_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); @@ -161,13 +161,13 @@ Read the candles and volumes from Bruce and produce a file for each day and for reportKey = "AAMasters" + "-" + "AAOlivia" + "-" + "Multi-Period-Daily" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because self dependecy Status Report is corrupt. Aborting Process."); callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile !== undefined) { @@ -195,8 +195,8 @@ Read the candles and volumes from Bruce and produce a file for each day and for } catch (err) { logger.write("[ERROR] start -> getContextVariables -> err = " + err.message); if (err.message === "Cannot read property 'file' of undefined") { - logger.write("[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its dependencies declarations are correct. "); - logger.write("[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(dependencies.keys)); + logger.write("[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its statusDependencies declarations are correct. "); + logger.write("[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(statusDependencies.keys)); } callBackFunction(global.DEFAULT_FAIL_RESPONSE); } @@ -663,7 +663,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for try { let reportKey = "AAMasters" + "-" + "AAOlivia" + "-" + "Multi-Period-Daily" + "-" + "dataSet.V1"; - let thisReport = dependencies.statusReports.get(reportKey); + let thisReport = statusDependencies.statusReports.get(reportKey); thisReport.file.lastExecution = bot.processDatetime; thisReport.file.lastFile = lastFileDate; diff --git a/Multi-Period-Market/User.bot.js b/Multi-Period-Market/User.bot.js index 6bf8d14c3..69bcab502 100644 --- a/Multi-Period-Market/User.bot.js +++ b/Multi-Period-Market/User.bot.js @@ -37,11 +37,11 @@ let utilities = UTILITIES.newUtilities(bot); - let dependencies; + let statusDependencies; return thisObject; - function initialize(pDependencies, pMonth, pYear, callBackFunction) { + function initialize(pStatusDependencies, pMonth, pYear, callBackFunction) { try { @@ -49,7 +49,7 @@ if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } - dependencies = pDependencies; + statusDependencies = pStatusDependencies; commons.initializeStorage(oliviaStorage, bruceStorage, onInizialized); @@ -110,13 +110,13 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Historic-Trades" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); callBackFunction(global.DEFAULT_RETRY_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); @@ -136,13 +136,13 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark reportKey = "AAMasters" + "-" + "AABruce" + "-" + "One-Min-Daily-Candles-Volumes" + "-" + "dataSet.V1" + "-" + bot.processDatetime.getUTCFullYear() + "-" + utilities.pad(bot.processDatetime.getUTCMonth() + 1,2); if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); callBackFunction(global.DEFAULT_RETRY_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { logger.write("[ERROR] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); @@ -161,13 +161,13 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark reportKey = "AAMasters" + "-" + "AAOlivia" + "-" + "Multi-Period-Market" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } - if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + if (statusDependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { logger.write("[ERROR] start -> getContextVariables -> Can not continue because self dependecy Status Report is corrupt. Aborting Process."); callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; } - thisReport = dependencies.statusReports.get(reportKey).file; + thisReport = statusDependencies.statusReports.get(reportKey).file; if (thisReport.lastFile !== undefined) { @@ -195,8 +195,8 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark } catch (err) { logger.write("[ERROR] start -> getContextVariables -> err = " + err.message); if (err.message === "Cannot read property 'file' of undefined") { - logger.write("[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its dependencies declarations are correct. "); - logger.write("[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(dependencies.keys)); + logger.write("[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its statusDependencies declarations are correct. "); + logger.write("[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(statusDependencies.keys)); logger.write("[HINT] start -> getContextVariables -> Dependencies loaded -> Double check that you are not running a process that only can be run at noTime mode at a certain month when it is not prepared to do so."); } callBackFunction(global.DEFAULT_FAIL_RESPONSE); @@ -851,7 +851,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark try { let reportKey = "AAMasters" + "-" + "AAOlivia" + "-" + "Multi-Period-Market" + "-" + "dataSet.V1"; - let thisReport = dependencies.statusReports.get(reportKey); + let thisReport = statusDependencies.statusReports.get(reportKey); thisReport.file.lastExecution = bot.processDatetime; thisReport.file.lastFile = lastFileDate; diff --git a/this.bot.config.json b/this.bot.config.json index c2c27cf6e..2e2901d87 100644 --- a/this.bot.config.json +++ b/this.bot.config.json @@ -32,7 +32,7 @@ "retryWaitTime": 10000, "sleepWaitTime": 3600000, "comaWaitTime": 86400000, - "dependencies": [ + "statusDependencies": [ { "devTeam": "AAMasters", "bot": "AACharly", @@ -88,7 +88,7 @@ "retryWaitTime": 10000, "sleepWaitTime": 3600000, "comaWaitTime": 86400000, - "dependencies": [ + "statusDependencies": [ { "devTeam": "AAMasters", "bot": "AACharly",