From dc472da8960d6b51dda356907e9c097bcd0e6e79 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 9 Aug 2019 01:19:47 +0200 Subject: [PATCH] Minor Improvements - All AAMaster sequence running. --- IndicatorBotProcessMainLoop.js | 2 +- Integrations/FileStorage.js | 7 +- Root.js | 4 +- sequence - all processes.json | 25 +++--- sequence.json | 144 ++++++++++++++++++++++++++++++--- 5 files changed, 152 insertions(+), 30 deletions(-) diff --git a/IndicatorBotProcessMainLoop.js b/IndicatorBotProcessMainLoop.js index bee07beff..93911b2db 100644 --- a/IndicatorBotProcessMainLoop.js +++ b/IndicatorBotProcessMainLoop.js @@ -433,7 +433,7 @@ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> startUserBot -> Entering function."); } - usertBot.start(onFinished); + usertBot.start(onFinished); function onFinished(err) { diff --git a/Integrations/FileStorage.js b/Integrations/FileStorage.js index 04d55c12a..5f9c7ce03 100644 --- a/Integrations/FileStorage.js +++ b/Integrations/FileStorage.js @@ -45,13 +45,16 @@ exports.newFileStorage = function newFileStorage() { } async function getTextFile(container, filePath, callBackFunction) { - logInfo('getTextFile: ' + container.toLowerCase() + '/...' + filePath.substring(filePath.length - 110, filePath.length)) + try { let host = await getDevTeamHost(container) if (host.url.indexOf('localhost') !== -1) { - let fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath + let fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath + + logInfo('getTextFile: ' + fileLocation) + let fileContent = await readFileAsync(fileLocation) callBackFunction(global.DEFAULT_OK_RESPONSE, fileContent.toString()) } else { diff --git a/Root.js b/Root.js index 65196deaa..84e3d4c8a 100644 --- a/Root.js +++ b/Root.js @@ -176,7 +176,7 @@ function onFileReceived(err, text) { if (err.result !== global.DEFAULT_OK_RESPONSE.result) { - console.log(logDisplace + "Root : [ERROR] start -> getBotConfig -> onInizialized -> onFileReceived -> err = "+ err); + console.log(logDisplace + "Root : [ERROR] start -> getBotConfig -> onInizialized -> onFileReceived -> err = " + JSON.stringify(err)); return; } @@ -186,7 +186,7 @@ botConfig.repo = cloneToExecute.repo; findProcess(); } catch (err) { - console.log(logDisplace + "Root : [ERROR] start -> getBotConfig -> onInizialized -> onFileReceived -> err = "+ err); + console.log(logDisplace + "Root : [ERROR] start -> getBotConfig -> onInizialized -> onFileReceived -> err = " + JSON.stringify(err)); return; } } diff --git a/sequence - all processes.json b/sequence - all processes.json index 740841b6a..9e39d1eac 100644 --- a/sequence - all processes.json +++ b/sequence - all processes.json @@ -23,7 +23,6 @@ "endYear": 2021, "month": 1 }, - { "devTeam": "AAMasters", "bot": "AABruce", @@ -108,18 +107,18 @@ "endYear": 2021, "month": 1 }, - { - "devTeam": "AAMasters", - "bot": "AAPaula", - "mode": "noTime", - "resumeExecution": true, - "type": "Sensor", - "exchangeName": "Poloniex", - "process": "Live-Trades", - "startYear": 2019, - "endYear": 2021, - "month": 1 - }, + { + "devTeam": "AAMasters", + "bot": "AAPaula", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, { "devTeam": "AAMasters", "bot": "AAPaula", diff --git a/sequence.json b/sequence.json index a0612a964..d86893a32 100644 --- a/sequence.json +++ b/sequence.json @@ -1,14 +1,134 @@ [ - { - "devTeam": "AAMasters", - "bot": "AACharly", - "mode": "noTime", - "resumeExecution": true, - "type": "Sensor", - "exchangeName": "Poloniex", - "process": "Live-Trades", - "startYear": 2019, - "endYear": 2021, - "month": 1 - } + { + "devTeam": "AAMasters", + "bot": "AACharly", + "mode": "noTime", + "resumeExecution": true, + "type": "Sensor", + "exchangeName": "Poloniex", + "process": "Live-Trades", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AACharly", + "mode": "noTime", + "resumeExecution": true, + "type": "Sensor", + "exchangeName": "Poloniex", + "process": "Hole-Fixing", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AABruce", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Single-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAOlivia", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAOlivia", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Market", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AATom", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AATom", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Market", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAChris", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAChris", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Market", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAPaula", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Daily", + "startYear": 2019, + "endYear": 2021, + "month": 1 + }, + { + "devTeam": "AAMasters", + "bot": "AAPaula", + "mode": "noTime", + "resumeExecution": true, + "type": "Indicator", + "exchangeName": "Poloniex", + "process": "Multi-Period-Market", + "startYear": 2019, + "endYear": 2021, + "month": 1 + } ]