BLOBs Realease

This commit is contained in:
Luis Fernando Molina committed 2018-04-13 20:46:31 +02:00
1 parent 07989b1295
commit 80d064ac6b
10 files changed
+40 -35

No files matched your search

Binary file not shown.
+7 -7
View File
@@ -1,5 +1,5 @@
exports.newFileStorage = function newFileStorage(BOT) {
exports.newBlobStorage = function newBlobStorage(BOT) {
const FULL_LOG = true;
const LOG_FILE_CONTENT = false;
@@ -34,18 +34,18 @@ exports.newFileStorage = function newFileStorage(BOT) {
return thisObject;
function initialize(pDataOwnerBotCodeName, callBackFunction) {
function initialize(pDataOwner, callBackFunction) {
try {
if (pDataOwnerBotCodeName === undefined) {
dataOwner = bot.codeName;
if (pDataOwner === undefined) {
dataOwner = bot.devTeam;
logger.fileName = MODULE_NAME + '.' + bot.devTeam + '.' + bot.codeName;
} else {
dataOwner = pDataOwnerBotCodeName;
dataOwner = pDataOwner.devTeam;
logger.fileName = MODULE_NAME + '.' + pDataOwner.devTeam + '.' + pDataOwner.bot;
}
logger.fileName = MODULE_NAME + '.' + dataOwner;
if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); }
readConnectionStringConfigFile(onConnectionStringReady);
+3 -3
View File
@@ -1,4 +1,4 @@
exports.newContext = function newContext(BOT, DEBUG_MODULE, FILE_STORAGE, UTILITIES, STATUS_REPORT) {
exports.newContext = function newContext(BOT, DEBUG_MODULE, BLOB_STORAGE, UTILITIES, STATUS_REPORT) {
const FULL_LOG = true;
const LOG_FILE_CONTENT = false;
@@ -74,7 +74,7 @@
/* Storage account to be used here. */
let cloudStorage = FILE_STORAGE.newFileStorage(bot);
let cloudStorage = BLOB_STORAGE.newBlobStorage(bot);
let dependencies;
@@ -97,7 +97,7 @@
function initializeStorage() {
cloudStorage.initialize(bot.codeName, onInizialized);
cloudStorage.initialize(bot, onInizialized);
function onInizialized(err) {
+9 -9
View File
@@ -1,4 +1,4 @@
exports.newDatasource = function newDatasource(BOT, DEBUG_MODULE, FILE_STORAGE, UTILITIES) {
exports.newDatasource = function newDatasource(BOT, DEBUG_MODULE, BLOB_STORAGE, UTILITIES) {
const FULL_LOG = true;
@@ -24,8 +24,8 @@
logger.fileName = MODULE_NAME;
logger.bot = bot;
let oliviaAzureFileStorage = FILE_STORAGE.newFileStorage(bot);
let tomAzureFileStorage = FILE_STORAGE.newFileStorage(bot);
let oliviaStorage = BLOB_STORAGE.newBlobStorage(bot);
let tomStorage = BLOB_STORAGE.newBlobStorage(bot);
/* Utilities needed. */
@@ -45,7 +45,7 @@
if (FULL_LOG === true) { logger.write("[INFO] initializeOliviaStorage -> Entering function."); }
oliviaAzureFileStorage.initialize("AAOlivia", onInizialized);
oliviaStorage.initialize({ bot: "AAOlivia", devTeam: "AAMasters" }, onInizialized);
function onInizialized(err) {
if (err.result === global.DEFAULT_OK_RESPONSE.result) {
@@ -61,7 +61,7 @@
if (FULL_LOG === true) { logger.write("[INFO] initializeTomStorage -> Entering function."); }
tomAzureFileStorage.initialize("AATom", onInizialized);
tomStorage.initialize({ bot: "AATom", devTeam: "AAMasters" }, onInizialized);
function onInizialized(err) {
if (err.result === global.DEFAULT_OK_RESPONSE.result) {
@@ -129,7 +129,7 @@
let periodTime = global.marketFilesPeriods[i][0];
let periodName = global.marketFilesPeriods[i][1];
getFile(oliviaAzureFileStorage, "@AssetA_@AssetB.json", "@Exchange/Output/Candles/Multi-Period-Market/@Period", periodName, undefined, onFileReceived, callBack);
getFile(oliviaStorage, "@AssetA_@AssetB.json", "@Exchange/Output/Candles/Multi-Period-Market/@Period", periodName, undefined, onFileReceived, callBack);
function onFileReceived(err, file) {
@@ -175,7 +175,7 @@
let periodTime = global.dailyFilePeriods[i][0];
let periodName = global.dailyFilePeriods[i][1];
getFile(oliviaAzureFileStorage, "@AssetA_@AssetB.json", "@Exchange/Output/Candles/Multi-Period-Daily/@Period/@Year/@Month/@Day", periodName, bot.processDatetime, onFileReceived, callBack);
getFile(oliviaStorage, "@AssetA_@AssetB.json", "@Exchange/Output/Candles/Multi-Period-Daily/@Period/@Year/@Month/@Day", periodName, bot.processDatetime, onFileReceived, callBack);
function onFileReceived(err, file) {
@@ -308,7 +308,7 @@
let periodTime = global.marketFilesPeriods[i][0];
let periodName = global.marketFilesPeriods[i][1];
getFile(tomAzureFileStorage, "@AssetA_@AssetB.json", "@Exchange/Tom/dataSet.V1/Output/Candle-Stairs/Multi-Period-Market/@Period", periodName, undefined, onFileReceived, callBack);
getFile(tomStorage, "@AssetA_@AssetB.json", "@Exchange/Tom/dataSet.V1/Output/Candle-Stairs/Multi-Period-Market/@Period", periodName, undefined, onFileReceived, callBack);
function onFileReceived(err, file) {
@@ -354,7 +354,7 @@
let periodTime = global.dailyFilePeriods[i][0];
let periodName = global.dailyFilePeriods[i][1];
getFile(tomAzureFileStorage, "@AssetA_@AssetB.json", "@Exchange/Tom/dataSet.V1/Output/Candle-Stairs/Multi-Period-Daily/@Period/@Year/@Month/@Day", periodName, bot.processDatetime, onFileReceived, callBack);
getFile(tomStorage, "@AssetA_@AssetB.json", "@Exchange/Tom/dataSet.V1/Output/Candle-Stairs/Multi-Period-Daily/@Period/@Year/@Month/@Day", periodName, bot.processDatetime, onFileReceived, callBack);
function onFileReceived(err, file) {
+2 -2
View File
@@ -1,4 +1,4 @@
exports.newDependencies = function newDependencies(BOT, DEBUG_MODULE, STATUS_REPORT, FILE_STORAGE, UTILITIES) {
exports.newDependencies = function newDependencies(BOT, DEBUG_MODULE, STATUS_REPORT, BLOB_STORAGE, UTILITIES) {
const FULL_LOG = true;
const LOG_FILE_CONTENT = false;
@@ -42,7 +42,7 @@
for (let i = 0; i < pDependenciesConfig.length; i++) {
let statusReportModule = STATUS_REPORT.newStatusReport(BOT, DEBUG_MODULE, FILE_STORAGE, UTILITIES);
let statusReportModule = STATUS_REPORT.newStatusReport(BOT, DEBUG_MODULE, BLOB_STORAGE, UTILITIES);
statusReportModule.initialize(pDependenciesConfig[i], pMonth, pYear, onInitilized);
+3 -3
View File
@@ -63,7 +63,7 @@
/* We define here all the modules that the rest of the infraestructure, including the bots themselves can consume. */
const UTILITIES = require(ROOT_DIR + 'Utilities');
const FILE_STORAGE = require(ROOT_DIR + 'File Storage');
const BLOB_STORAGE = require(ROOT_DIR + 'Blob Storage');
const DEBUG_MODULE = require(ROOT_DIR + 'Debug Log');
const STATUS_REPORT = require(ROOT_DIR + 'Status Report');
const POLONIEX_CLIENT_MODULE = require(ROOT_DIR + 'Poloniex API Client');
@@ -86,7 +86,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeDependencies -> Entering function."); }
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, FILE_STORAGE, UTILITIES);
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, BLOB_STORAGE, UTILITIES);
dependencies.initialize(processConfig.dependencies, pMonth, pYear, onInizialized);
@@ -117,7 +117,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeUserBot -> Entering function."); }
usertBot = USER_BOT_MODULE.newUserBot(bot, COMMONS_MODULE, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE);
usertBot = USER_BOT_MODULE.newUserBot(bot, COMMONS_MODULE, UTILITIES, DEBUG_MODULE, BLOB_STORAGE, STATUS_REPORT, POLONIEX_CLIENT_MODULE);
usertBot.initialize(dependencies, pMonth, pYear, onInizialized);
+3 -3
View File
@@ -63,7 +63,7 @@
/* We define here all the modules that the rest of the infraestructure, including the bots themselves can consume. */
const UTILITIES = require(ROOT_DIR + 'Utilities');
const FILE_STORAGE = require(ROOT_DIR + 'File Storage');
const BLOB_STORAGE = require(ROOT_DIR + 'Blob Storage');
const DEBUG_MODULE = require(ROOT_DIR + 'Debug Log');
const STATUS_REPORT = require(ROOT_DIR + 'Status Report');
const DEPENDENCIES = require(ROOT_DIR + 'Dependencies');
@@ -85,7 +85,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeDependencies -> Entering function."); }
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, FILE_STORAGE, UTILITIES);
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, BLOB_STORAGE, UTILITIES);
dependencies.initialize(processConfig.dependencies, pMonth, pYear, onInizialized);
@@ -116,7 +116,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeUserBot -> Entering function."); }
usertBot = USER_BOT_MODULE.newUserBot(bot, COMMONS_MODULE, UTILITIES, DEBUG_MODULE, FILE_STORAGE);
usertBot = USER_BOT_MODULE.newUserBot(bot, COMMONS_MODULE, UTILITIES, DEBUG_MODULE, BLOB_STORAGE, BLOB_STORAGE);
usertBot.initialize(dependencies, pMonth, pYear, onInizialized);
+3 -3
View File
@@ -1,4 +1,4 @@
exports.newStatusReport = function newStatusReport(BOT, DEBUG_MODULE, FILE_STORAGE, UTILITIES) {
exports.newStatusReport = function newStatusReport(BOT, DEBUG_MODULE, BLOB_STORAGE, UTILITIES) {
const FULL_LOG = true;
const LOG_FILE_CONTENT = false;
@@ -34,7 +34,7 @@
/* Storage account to be used here. */
let cloudStorage = FILE_STORAGE.newFileStorage(bot);
let cloudStorage = BLOB_STORAGE.newBlobStorage(bot);
let month;
let year;
@@ -66,7 +66,7 @@
function initializeStorage() {
cloudStorage.initialize(owner.bot, onInizialized);
cloudStorage.initialize(owner, onInizialized);
function onInizialized(err) {
+4 -4
View File
@@ -63,7 +63,7 @@
/* We define here all the modules that the rest of the infraestructure, including the bots themselves can consume. */
const UTILITIES = require(ROOT_DIR + 'Utilities');
const FILE_STORAGE = require(ROOT_DIR + 'File Storage');
const BLOB_STORAGE = require(ROOT_DIR + 'Blob Storage');
const DEBUG_MODULE = require(ROOT_DIR + 'Debug Log');
const POLONIEX_CLIENT_MODULE = require(ROOT_DIR + 'Poloniex API Client');
const EXCHANGE_API = require(ROOT_DIR + 'ExchangeAPI');
@@ -94,7 +94,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeDependencies -> Entering function."); }
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, FILE_STORAGE, UTILITIES);
dependencies = DEPENDENCIES.newDependencies(bot, DEBUG_MODULE, STATUS_REPORT, BLOB_STORAGE, UTILITIES);
dependencies.initialize(processConfig.dependencies, undefined, undefined, onInizialized);
@@ -125,7 +125,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeContext -> Entering function."); }
context = CONTEXT.newContext(bot, DEBUG_MODULE, FILE_STORAGE, UTILITIES, STATUS_REPORT);
context = CONTEXT.newContext(bot, DEBUG_MODULE, BLOB_STORAGE, UTILITIES, STATUS_REPORT);
context.initialize(dependencies, onInizialized);
function onInizialized(err) {
@@ -155,7 +155,7 @@
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeDatasource -> Entering function."); }
datasource = DATASOURCE.newDatasource(bot, DEBUG_MODULE, FILE_STORAGE, UTILITIES);
datasource = DATASOURCE.newDatasource(bot, DEBUG_MODULE, BLOB_STORAGE, UTILITIES);
datasource.initialize(onInizialized);
function onInizialized(err) {
+6 -1
View File
@@ -35,10 +35,15 @@
"enabled": "true",
"botPath": "../Bots/AAMasters/AACharly-Extraction-Bot",
"process": "Poloniex-Live-Trades"
},
{
"enabled": "false",
"botPath": "../Bots/AAMasters/AAMiguel-Indicator-Bot",
"process": "Trades-Files-To-Blobs"
}
],
"stopGracefully": "false",
"exchangeSimulationMode": "false",
"storageConnStringFolder": "Testnet",
"storageConnStringFolder": "Production",
"maxLogLoops": 5
}