From e3596e23e8949da7739febec9761b8e34aae7038 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 26 Dec 2019 10:46:30 +0100 Subject: [PATCH] Data Mine Refactoring --- Multi-Period-Daily/User.bot.js | 14 +++++++------- Multi-Period-Market/User.bot.js | 16 ++++++++-------- this.bot.config.json | 18 +++++++++--------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Multi-Period-Daily/User.bot.js b/Multi-Period-Daily/User.bot.js index fb17ab8f6..89b588a93 100644 --- a/Multi-Period-Daily/User.bot.js +++ b/Multi-Period-Daily/User.bot.js @@ -287,11 +287,11 @@ Read the candles and volumes from Bruce and produce a file for each day and for let dateForPath = contextVariables.lastCandleFile.getUTCFullYear() + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2); let fileName = market.assetA + '_' + market.assetB + ".json" - let filePathRoot = bot.devTeam + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; + let filePathRoot = bot.dataMine + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; let filePath = filePathRoot + "/Output/" + CANDLES_FOLDER_NAME + '/' + CANDLES_ONE_MIN + '/' + dateForPath; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> periodsLoop -> loopBody -> getting file at dateForPath = " + dateForPath); @@ -413,11 +413,11 @@ Read the candles and volumes from Bruce and produce a file for each day and for let dateForPath = contextVariables.lastCandleFile.getUTCFullYear() + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2); let fileName = market.assetA + '_' + market.assetB + ".json" - let filePathRoot = bot.devTeam + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; + let filePathRoot = bot.dataMine + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; let filePath = filePathRoot + "/Output/" + VOLUMES_FOLDER_NAME + '/' + VOLUMES_ONE_MIN + '/' + dateForPath; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> getting file at dateForPath = " + dateForPath); @@ -580,7 +580,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for let filePath = bot.filePathRoot + "/Output/" + CANDLES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod + "/" + dateForPath; filePath += '/' + fileName - fileStorage.createTextFile(bot.devTeam, filePath, fileContent + '\n', onFileCreated); + fileStorage.createTextFile(bot.dataMine, filePath, fileContent + '\n', onFileCreated); logger.write(MODULE_NAME, "[INFO] start -> writeFiles -> writeCandles -> creating file at filePath = " + filePath); @@ -631,7 +631,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for let filePath = bot.filePathRoot + "/Output/" + VOLUMES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod + "/" + dateForPath; filePath += '/' + fileName - fileStorage.createTextFile(bot.devTeam, filePath, fileContent + '\n', onFileCreated); + fileStorage.createTextFile(bot.dataMine, filePath, fileContent + '\n', onFileCreated); logger.write(MODULE_NAME, "[INFO] start -> writeFiles -> writeVolumes -> creating file at filePath = " + filePath); @@ -719,7 +719,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for let filePath = bot.filePathRoot + "/Output/" + pProductFolder + "/" + bot.process; filePath += '/' + fileName - fileStorage.createTextFile(bot.devTeam, filePath, fileContent + '\n', onFileCreated); + fileStorage.createTextFile(bot.dataMine, filePath, fileContent + '\n', onFileCreated); function onFileCreated(err) { diff --git a/Multi-Period-Market/User.bot.js b/Multi-Period-Market/User.bot.js index ed10eb625..4971a1832 100644 --- a/Multi-Period-Market/User.bot.js +++ b/Multi-Period-Market/User.bot.js @@ -256,7 +256,7 @@ let filePath = bot.filePathRoot + "/Output/" + CANDLES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> findPreviousContent -> loopBody -> getCandles -> getting file."); @@ -295,7 +295,7 @@ let filePath = bot.filePathRoot + "/Output/" + VOLUMES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> findPreviousContent -> loopBody -> getVolumes -> getting file."); @@ -501,11 +501,11 @@ let dateForPath = contextVariables.lastCandleFile.getUTCFullYear() + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2); let fileName = market.assetA + '_' + market.assetB + ".json" - let filePathRoot = bot.devTeam + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; + let filePathRoot = bot.dataMine + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; let filePath = filePathRoot + "/Output/" + CANDLES_FOLDER_NAME + '/' + CANDLES_ONE_MIN + '/' + dateForPath; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextCandleFile -> getting file at dateForPath = " + dateForPath); @@ -632,11 +632,11 @@ let dateForPath = contextVariables.lastCandleFile.getUTCFullYear() + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '/' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2); let fileName = market.assetA + '_' + market.assetB + ".json" - let filePathRoot = bot.devTeam + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; + let filePathRoot = bot.dataMine + "/" + "AABruce" + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + global.EXCHANGE_NAME + "/" + bot.dataSetVersion; let filePath = filePathRoot + "/Output/" + VOLUMES_FOLDER_NAME + '/' + VOLUMES_ONE_MIN + '/' + dateForPath; filePath += '/' + fileName - fileStorage.getTextFile(bot.devTeam, filePath, onFileReceived); + fileStorage.getTextFile(bot.dataMine, filePath, onFileReceived); logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> getting file at dateForPath = " + dateForPath); @@ -782,7 +782,7 @@ let filePath = bot.filePathRoot + "/Output/" + CANDLES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod; filePath += '/' + fileName - fileStorage.createTextFile(bot.devTeam, filePath, fileContent + '\n', onFileCreated); + fileStorage.createTextFile(bot.dataMine, filePath, fileContent + '\n', onFileCreated); logger.write(MODULE_NAME, "[INFO] start -> writeFiles -> writeCandles -> creating file at filePath = " + filePath); @@ -832,7 +832,7 @@ let filePath = bot.filePathRoot + "/Output/" + VOLUMES_FOLDER_NAME + "/" + bot.process + "/" + timePeriod; filePath += '/' + fileName - fileStorage.createTextFile(bot.devTeam, filePath, fileContent + '\n', onFileCreated); + fileStorage.createTextFile(bot.dataMine, filePath, fileContent + '\n', onFileCreated); logger.write(MODULE_NAME, "[INFO] start -> writeFiles -> writeVolumes -> creating file at filePath = " + filePath); diff --git a/this.bot.config.json b/this.bot.config.json index 5b30d5c86..7b7b7e879 100644 --- a/this.bot.config.json +++ b/this.bot.config.json @@ -7,7 +7,7 @@ "minor": 0, "patch": 0 }, - "devTeam": "AAMasters", + "dataMine": "AAMasters", "profilePicture": "Olivia.png", "dataSetVersion": "dataSet.V1", "processes": [ @@ -50,7 +50,7 @@ ], "statusDependencies": [ { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AACharly", "botVersion": { "major": 1, @@ -60,7 +60,7 @@ "dataSetVersion": "dataSet.V1" }, { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AABruce", "botVersion": { "major": 1, @@ -72,7 +72,7 @@ "waitUntilNextUpdate": true }, { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AAOlivia", "botVersion": { "major": 1, @@ -122,7 +122,7 @@ ], "statusDependencies": [ { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AACharly", "botVersion": { "major": 1, @@ -132,7 +132,7 @@ "dataSetVersion": "dataSet.V1" }, { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AABruce", "botVersion": { "major": 1, @@ -144,7 +144,7 @@ "waitUntilNextUpdate": true }, { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "bot": "AAOlivia", "botVersion": { "major": 1, @@ -192,7 +192,7 @@ } ], "plotter": { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "codeName": "PlottersCandlesVolumes", "moduleName": "Candles" } @@ -232,7 +232,7 @@ } ], "plotter": { - "devTeam": "AAMasters", + "dataMine": "AAMasters", "codeName": "PlottersCandlesVolumes", "moduleName": "Volumes" }