diff --git a/.vs/AACharly-Extraction-Bot/v15/.suo b/.vs/AACharly-Extraction-Bot/v15/.suo index a7838b1dc..edce816ae 100644 Binary files a/.vs/AACharly-Extraction-Bot/v15/.suo and b/.vs/AACharly-Extraction-Bot/v15/.suo differ diff --git a/Poloniex-Historic-Trades/Interval.js b/Poloniex-Historic-Trades/Interval.js index 708476614..60b32edc6 100644 --- a/Poloniex-Historic-Trades/Interval.js +++ b/Poloniex-Historic-Trades/Interval.js @@ -27,7 +27,7 @@ let markets; - let charlyFileStorage = FILE_STORAGE.newFileStorage(bot); + let charlyStorage = FILE_STORAGE.newFileStorage(bot); let utilities = UTILITIES.newUtilities(bot); @@ -51,7 +51,7 @@ console.log(logText); logger.write(logText); - charlyFileStorage.initialize(); + charlyStorage.initialize(); markets = MARKETS_MODULE.newMarkets(bot); markets.initialize(callBackFunction); @@ -277,7 +277,7 @@ This process complements the Live Trades process and write historical trades fil let reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process; let fileName = "Status.Report." + market.assetA + '_' + market.assetB + ".json"; - charlyFileStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); + charlyStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); function onFileReceived(text) { @@ -333,7 +333,7 @@ This process complements the Live Trades process and write historical trades fil let reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process + "/" + year + "/" + month; let fileName = "Status.Report." + market.assetA + '_' + market.assetB + ".json"; - charlyFileStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); + charlyStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); function onFileReceived(text) { @@ -726,11 +726,11 @@ This process complements the Live Trades process and write historical trades fil filePath = EXCHANGE_NAME + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - utilities.createFolderIfNeeded(filePath, charlyFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, charlyStorage, onFolderCreated); function onFolderCreated() { - charlyFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + charlyStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated() { @@ -848,7 +848,7 @@ This process complements the Live Trades process and write historical trades fil let reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process + "/" + year + "/" + month; - utilities.createFolderIfNeeded(reportFilePath, charlyFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(reportFilePath, charlyStorage, onFolderCreated); function onFolderCreated() { @@ -867,7 +867,7 @@ This process complements the Live Trades process and write historical trades fil let fileContent = JSON.stringify(report); - charlyFileStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onFileCreated); + charlyStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated() { @@ -879,7 +879,7 @@ This process complements the Live Trades process and write historical trades fil reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process; - utilities.createFolderIfNeeded(reportFilePath, charlyFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(reportFilePath, charlyStorage, onFolderCreated); function onFolderCreated() { @@ -898,7 +898,7 @@ This process complements the Live Trades process and write historical trades fil let fileContent = JSON.stringify(report); - charlyFileStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onMasterFileCreated); + charlyStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onMasterFileCreated); function onMasterFileCreated() { @@ -965,7 +965,7 @@ This process complements the Live Trades process and write historical trades fil /* Lets read the main status report */ - charlyFileStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); + charlyStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); function onFileReceived(text) { @@ -1001,7 +1001,7 @@ This process complements the Live Trades process and write historical trades fil let reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process + "/" + initialYear + "/" + paddedInitialMonth; let fileName = "Status.Report." + market.assetA + '_' + market.assetB + ".json"; - charlyFileStorage.getTextFile(reportFilePath, fileName, onStatusReportFileReceived, true); + charlyStorage.getTextFile(reportFilePath, fileName, onStatusReportFileReceived, true); function onStatusReportFileReceived(text) { @@ -1067,7 +1067,7 @@ This process complements the Live Trades process and write historical trades fil let reportFilePath = EXCHANGE_NAME + "/Processes/" + bot.process; let fileName = "Status.Report." + market.assetA + '_' + market.assetB + ".json"; - charlyFileStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); + charlyStorage.getTextFile(reportFilePath, fileName, onFileReceived, true); function onFileReceived(text) { @@ -1077,7 +1077,7 @@ This process complements the Live Trades process and write historical trades fil let fileContent = JSON.stringify(statusReport); - charlyFileStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onMasterFileCreated); + charlyStorage.createTextFile(reportFilePath, fileName, fileContent + '\n', onMasterFileCreated); function onMasterFileCreated() { diff --git a/Poloniex-Hole-Fixing/User.bot.js b/Poloniex-Hole-Fixing/User.bot.js index b21786f3a..b978cb859 100644 --- a/Poloniex-Hole-Fixing/User.bot.js +++ b/Poloniex-Hole-Fixing/User.bot.js @@ -1,4 +1,4 @@ -exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE) { +exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, BLOB_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE) { const FULL_LOG = true; const LOG_FILE_CONTENT = false; @@ -23,11 +23,11 @@ start: start }; - let charlyFileStorage = FILE_STORAGE.newFileStorage(bot); + let charlyStorage = BLOB_STORAGE.newBlobStorage(bot); let utilities = UTILITIES.newUtilities(bot); let poloniexApiClient = new POLONIEX_CLIENT_MODULE(); - let statusReportModule = STATUS_REPORT.newStatusReport(BOT, DEBUG_MODULE, FILE_STORAGE, UTILITIES); + let statusReportModule = STATUS_REPORT.newStatusReport(BOT, DEBUG_MODULE, BLOB_STORAGE, UTILITIES); let year; let month; @@ -51,7 +51,7 @@ if (FULL_LOG === true) { logger.write("[INFO] initialize -> pYear = " + year); } if (FULL_LOG === true) { logger.write("[INFO] initialize -> pMonth = " + month); } - charlyFileStorage.initialize("AACharly", onCharlyInizialized); + charlyStorage.initialize({ bot: "AACharly", devTeam: "AAMasters" }, onCharlyInizialized); function onCharlyInizialized(err) { @@ -450,7 +450,7 @@ What is the lastFile pointer? filePath = bot.filePathRoot + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - charlyFileStorage.getTextFile(filePath, fileName, onNextFileReceived, true); + charlyStorage.getTextFile(filePath, fileName, onNextFileReceived, true); function onNextFileReceived(err, text) { @@ -718,7 +718,7 @@ What is the lastFile pointer? filePath = bot.filePathRoot + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - charlyFileStorage.getTextFile(filePath, fileName, onNextFileReceived, true); + charlyStorage.getTextFile(filePath, fileName, onNextFileReceived, true); function onNextFileReceived(err, text) { @@ -1075,7 +1075,7 @@ What is the lastFile pointer? filePath = bot.filePathRoot + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - utilities.createFolderIfNeeded(filePath, charlyFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, charlyStorage, onFolderCreated); function onFolderCreated(err) { @@ -1089,7 +1089,7 @@ What is the lastFile pointer? return; } - charlyFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + charlyStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated(err) { diff --git a/Poloniex-Live-Trades/User.bot.js b/Poloniex-Live-Trades/User.bot.js index 41d53203c..2b50c2fbd 100644 --- a/Poloniex-Live-Trades/User.bot.js +++ b/Poloniex-Live-Trades/User.bot.js @@ -1,4 +1,4 @@ -exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE) { +exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, BLOB_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE) { const FULL_LOG = true; const LOG_FILE_CONTENT = false; @@ -23,7 +23,7 @@ start: start }; - let charlyFileStorage = FILE_STORAGE.newFileStorage(bot); + let charlyStorage = BLOB_STORAGE.newBlobStorage(bot); let utilities = UTILITIES.newUtilities(bot); let poloniexApiClient = new POLONIEX_CLIENT_MODULE(); @@ -42,7 +42,7 @@ dependencies = pDependencies; - charlyFileStorage.initialize("AACharly", onCharlyInizialized); + charlyStorage.initialize({ bot: "AACharly", devTeam: "AAMasters" }, onCharlyInizialized); function onCharlyInizialized(err) { @@ -128,7 +128,7 @@ Array of records with this information: filePathA = bot.filePathRoot + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPathA; filePathB = bot.filePathRoot + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPathB; - utilities.createFolderIfNeeded(filePathA, charlyFileStorage, onFolderACreated); + utilities.createFolderIfNeeded(filePathA, charlyStorage, onFolderACreated); function onFolderACreated(err) { @@ -140,7 +140,7 @@ Array of records with this information: return; } - utilities.createFolderIfNeeded(filePathB, charlyFileStorage, onFolderBCreated); + utilities.createFolderIfNeeded(filePathB, charlyStorage, onFolderBCreated); } function onFolderBCreated(err) { @@ -153,7 +153,7 @@ Array of records with this information: return; } - utilities.createFolderIfNeeded(reportFilePath, charlyFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(reportFilePath, charlyStorage, onFolderCreated); } function onFolderCreated(err) { @@ -284,7 +284,7 @@ Array of records with this information: fileContent = fileContent + ']'; - charlyFileStorage.createTextFile(filePathA, fileNameA, fileContent + '\n', onFirstFileACreated); + charlyStorage.createTextFile(filePathA, fileNameA, fileContent + '\n', onFirstFileACreated); function onFirstFileACreated(err) { @@ -349,7 +349,7 @@ Array of records with this information: fileContent = fileContent + ']'; - charlyFileStorage.createTextFile(filePathB, fileNameB, fileContent + '\n', onFileBCreated); + charlyStorage.createTextFile(filePathB, fileNameB, fileContent + '\n', onFileBCreated); function onFileBCreated(err) {