Improving sequence

This commit is contained in:
Matias committed 2019-08-07 17:42:06 -03:00
1 parent 1d7e99426f
commit 34eddf6734
3 files changed
+160 -148

No files matched your search

+14 -14
View File
@@ -58,7 +58,7 @@
usertBot.initialize(dataDependencies, callBackFunction);
} catch (err) {
logger.write(MODULE_NAME, "[ERROR] initialize -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] initialize -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -124,7 +124,7 @@
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoop -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoop -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -183,7 +183,7 @@
if (err.result !== global.DEFAULT_OK_RESPONSE.result) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> onFileReceived -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> onFileReceived -> err = ", err);
callBackFunction(err);
return;
}
@@ -195,20 +195,20 @@
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> onFileReceived -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> onFileReceived -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> dependencyLoopBody -> getFile -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoop -> dependencyLoopBody -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoop -> dependencyLoopBody -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -232,7 +232,7 @@
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> dependencyControlLoop -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> dependencyControlLoop -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -269,19 +269,19 @@
periodsControlLoop();
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> callTheBot -> onBotFinished -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> callTheBot -> onBotFinished -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch(err){
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> callTheBot -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> callTheBot -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsLoopBody -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -305,14 +305,14 @@
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsControlLoop -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> periodsControlLoop -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> processTimePeriods -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
@@ -331,14 +331,14 @@
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
}
catch (err) {
logger.write(MODULE_NAME, "[ERROR] start -> err = "+ err);
logger.write(MODULE_NAME, "[ERROR] start -> err = ", err);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
+15 -14
View File
@@ -12,7 +12,7 @@ global.CLONE_EXECUTOR = { codeName: 'AACloud', version: '1.1' };
process.on('uncaughtException', function (err) {
console.log('[INFO] Run -> uncaughtException -> err.message = ' + err.message);
console.log('[INFO] Run -> uncaughtException -> err.stack = '+ err.stack);
console.log('[INFO] Run -> uncaughtException -> err.stack = ' + err.stack);
process.exit(1)
});
@@ -43,19 +43,20 @@ if (isRunSequence) {
function sequenceExecution(currentStep) {
let execution = sequenceList[currentStep];
process.env.STOP_GRACEFULLY = true;
process.env.DEV_TEAM = execution.devTeam;
process.env.BOT = execution.bot;
process.env.START_MODE = execution.mode;
process.env.RESUME_EXECUTION = execution.resumeExecution;
process.env.TYPE = execution.type;
process.env.PROCESS = execution.process;
process.env.MIN_YEAR = execution.startYear;
process.env.MAX_YEAR = execution.endYear;
process.env.MONTH = execution.month;
process.env.BEGIN_DATE_TIME = execution.beginDatetime;
process.env.TIME_PERIOD = execution.timePeriod;
execution.devTeam ? process.env.DEV_TEAM = execution.devTeam : undefined;
execution.bot ? process.env.BOT = execution.bot : undefined;
execution.mode ? process.env.START_MODE = execution.mode : undefined;
execution.resumeExecution ? process.env.RESUME_EXECUTION = execution.resumeExecution : undefined;
execution.type ? process.env.TYPE = execution.type : undefined;
execution.process ? process.env.PROCESS = execution.process : undefined;
execution.startYear ? process.env.MIN_YEAR = execution.startYear : undefined;
execution.endYear ? process.env.MAX_YEAR = execution.endYear : undefined;
execution.month ? process.env.MONTH = execution.month : undefined;
execution.beginDatetime ? process.env.BEGIN_DATE_TIME = execution.beginDatetime : undefined;
global.EXCHANGE_NAME = execution.exchangeName;
execution.timePeriod ? process.env.TIME_PERIOD = execution.timePeriod : undefined;
execution.exchangeName ? global.EXCHANGE_NAME = execution.exchangeName : undefined;
// global.FULL_LOG = execution.fullLog;
let stepKey = execution.devTeam + '.' + execution.bot + '.' + execution.process;
@@ -180,7 +181,7 @@ function readExecutionConfiguration() {
}
catch (err) {
console.log("[ERROR] readExecutionConfiguration -> err = "+ err);
console.log("[ERROR] readExecutionConfiguration -> err = " + err);
console.log("[ERROR] readExecutionConfiguration -> Please verify that the Start Mode for the type of Bot configured applies to that type.");
console.log("[ERROR] readExecutionConfiguration -> err = " + err.stack);
}
+131 -120
View File
@@ -23,6 +23,137 @@
"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
},
{
"devTeam": "AAVikings",
"bot": "AAGauss",
"mode": "noTime",
"resumeExecution": true,
"type": "Indicator",
"exchangeName": "Poloniex",
"process": "Multi-Period-Daily",
"startYear": 2019,
"endYear": 2021,
"month": 1
},
{
"devTeam": "AAVikings",
"bot": "AAGauss",
"mode": "noTime",
"resumeExecution": true,
"type": "Indicator",
"exchangeName": "Poloniex",
"process": "Multi-Period-Market",
"startYear": 2019,
"endYear": 2021,
"month": 1
},
{
"devTeam": "vikingsalerts",
"bot": "simulator-bot-vikingsalerts",
"mode": "noTime",
"resumeExecution": true,
"type": "Indicator",
"exchangeName": "Poloniex",
"process": "Multi-Period-Daily",
"beginDatetime": "2019-08-01T08:00:00.000Z",
"timePeriod": "05-min"
},
{
"devTeam": "AAMasters",
"bot": "AABruce",
@@ -34,125 +165,5 @@
"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
},
{
"devTeam": "AAVikings",
"bot": "AAGauss",
"mode": "noTime",
"resumeExecution": true,
"type": "Indicator",
"exchangeName": "Poloniex",
"process": "Multi-Period-Daily",
"startYear": 2019,
"endYear": 2021,
"month": 1
},
{
"devTeam": "AAVikings",
"bot": "AAGauss",
"mode": "noTime",
"resumeExecution": true,
"type": "Indicator",
"exchangeName": "Poloniex",
"process": "Multi-Period-Market",
"startYear": 2019,
"endYear": 2021,
"month": 1
}
]