Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Luis Fernando Molina committed 2019-08-09 16:21:35 +02:00
commit 5ad14acca5
1 file changed
+15 -15
+15 -15
View File
@@ -27,10 +27,9 @@ process.on('exit', function (code) {
console.log('[INFO] Run -> process.on.exit -> About to exit -> code = ' + code)
})
let sequenceList = require('./sequence');
let isRunSequence = false;
let sequenceStep = 0;
let loopCount = 0;
let processedSteps = new Map()
if (process.env.RUN_SEQUENCE !== undefined) {
isRunSequence = JSON.parse(process.env.RUN_SEQUENCE)
@@ -56,22 +55,23 @@ function sequenceExecution(currentStep) {
execution.month ? process.env.MONTH = execution.month : undefined;
execution.beginDatetime ? process.env.BEGIN_DATE_TIME = execution.beginDatetime : undefined;
execution.dataSet ? process.env.DATA_SET = execution.dataSet : undefined;
process.env.CLONE_ID = 1;
execution.timePeriod ? process.env.TIME_PERIOD = execution.timePeriod : undefined;
execution.baseAsset ? process.env.BASE_ASSET = execution.baseAsset : undefined;
execution.balanceAssetA ? process.env.INITIAL_BALANCE_ASSET_A = execution.balanceAssetA : undefined;
execution.balanceAssetB ? process.env.INITIAL_BALANCE_ASSET_B = execution.balanceAssetB : undefined;
execution.type === 'Trading' ? process.env.CLONE_ID = 1 : undefined;
execution.exchangeName ? global.EXCHANGE_NAME = execution.exchangeName : undefined;
// global.FULL_LOG = execution.fullLog;
let stepKey = execution.devTeam + '.' + execution.bot + '.' + execution.process
if (processedSteps.has(stepKey)) {
processedSteps.set(stepKey, processedSteps.get(stepKey) + 1)
} else {
processedSteps.set(stepKey, 0)
}
console.log('EXECUTION: ' + JSON.stringify(execution))
readExecutionConfiguration()
sequenceStep++
let stepKey = execution.devTeam + '.' + execution.bot + '.' + execution.process;
if (processedSteps.has(stepKey)) {
processedSteps.set(stepKey, processedSteps.get(stepKey) + 1);
} else {
processedSteps.set(stepKey, 0);
}
console.log("Sequence Execution Parameters: " + JSON.stringify(execution))
readExecutionConfiguration();
sequenceStep++;
}
function onExecutionFinish (result, finishStepKey) {
@@ -87,7 +87,7 @@ function onExecutionFinish (result, finishStepKey) {
} else {
setTimeout(function () {
console.log("[INFO] onExecutionFinish -> New round for sequence execution started.");
loopCount++;
sequenceList = require('./sequence'); // We read again the sequence after every loop
sequenceStep = 0;
processedSteps = new Map();
sequenceExecution(sequenceStep);