diff --git a/.vs/AABruce-Indicator-Bot/v15/.suo b/.vs/AABruce-Indicator-Bot/v15/.suo index 333d97a44..89347f07f 100644 Binary files a/.vs/AABruce-Indicator-Bot/v15/.suo and b/.vs/AABruce-Indicator-Bot/v15/.suo differ diff --git a/One-Min-Daily-Candles-Volumes/User.bot.js b/One-Min-Daily-Candles-Volumes/User.bot.js index 0ee4dc891..c0665a3fa 100644 --- a/One-Min-Daily-Candles-Volumes/User.bot.js +++ b/One-Min-Daily-Candles-Volumes/User.bot.js @@ -40,18 +40,18 @@ let year; let month; - let dependencies; + let statusDependencies; return thisObject; - function initialize(pDependencies, pMonth, pYear, callBackFunction) { + function initialize(pStatusDependencies, pMonth, pYear, callBackFunction) { try { year = pYear; month = pMonth; month = utilities.pad(month, 2); // Adding a left zero when needed. - dependencies = pDependencies; + statusDependencies = pStatusDependencies; logger.fileName = MODULE_NAME + "-" + year + "-" + month; @@ -59,8 +59,6 @@ if (FULL_LOG === true) { logger.write("[INFO] initialize -> pYear = " + year); } if (FULL_LOG === true) { logger.write("[INFO] initialize -> pMonth = " + month); } - dependencies = pDependencies; - commons.initializeStorage(charlyStorage, bruceStorage, onInizialized); function onInizialized(err) { @@ -145,13 +143,13 @@ 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); @@ -204,13 +202,13 @@ reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Hole-Fixing" + "-" + "dataSet.V1" + "-" + year + "-" + month; 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); @@ -257,13 +255,13 @@ reportKey = "AAMasters" + "-" + "AABruce" + "-" + "One-Min-Daily-Candles-Volumes" + "-" + "dataSet.V1" + "-" + year + "-" + month; 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) { logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); @@ -305,8 +303,8 @@ } 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); } @@ -1035,7 +1033,7 @@ try { let key = bot.devTeam + "-" + bot.codeName + "-" + bot.process + "-" + bot.dataSetVersion + "-" + year + "-" + month; - let statusReport = dependencies.statusReports.get(key); + let statusReport = statusDependencies.statusReports.get(key); statusReport.file = { lastFile: { diff --git a/package-lock.json b/package-lock.json index 87c40254f..907c2fa8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3,7 +3,7 @@ "version": "1.0.0", "lockfileVersion": 1, "requires": true, - "dependencies": { + "statusDependencies": { "ajv": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz", @@ -57,7 +57,7 @@ "xml2js": "0.2.7", "xmlbuilder": "0.4.3" }, - "dependencies": { + "statusDependencies": { "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", @@ -186,7 +186,7 @@ "tunnel-agent": "0.6.0", "uuid": "3.1.0" }, - "dependencies": { + "statusDependencies": { "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -256,7 +256,7 @@ "requires": { "boom": "5.2.0" }, - "dependencies": { + "statusDependencies": { "boom": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", diff --git a/package.json b/package.json index 8b75c1a4f..3b68e8972 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "author": "Luis-Fernando-Molina", "license": "ISC", - "dependencies": { + "statusDependencies": { "azure-storage": "^2.6.0", "node-uuid": "^1.4.8", "nonce": "^1.0.4", diff --git a/this.bot.config.json b/this.bot.config.json index f6f832ad4..9ca998f5f 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",