variable refactoring
This commit is contained in:
1 parent
8d0dd2614d
commit
d793ddbe6d
2 files changed
+8
-8
No files matched your search
+6
-6
@@ -86,7 +86,7 @@
|
||||
|
||||
let previousDay; // Holds the date of the previous day relative to the processing date.
|
||||
|
||||
let interExecutionMemoryArray = [];
|
||||
let variableArray = [];
|
||||
|
||||
getContextVariables();
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
}
|
||||
|
||||
contextVariables.lastFile = new Date(thisReport.lastFile);
|
||||
interExecutionMemoryArray = thisReport.interExecutionMemoryArray;
|
||||
variableArray = thisReport.variableArray;
|
||||
|
||||
processSingleFiles();
|
||||
return;
|
||||
@@ -203,11 +203,11 @@
|
||||
This data structure has one object per each timeFrame.
|
||||
*/
|
||||
|
||||
interExecutionMemoryArray = [];
|
||||
variableArray = [];
|
||||
|
||||
for (let i = 0; i < global.dailyFilePeriods.length; i++) {
|
||||
let emptyObject = {};
|
||||
interExecutionMemoryArray.push(emptyObject);
|
||||
variableArray.push(emptyObject);
|
||||
}
|
||||
|
||||
processSingleFiles();
|
||||
@@ -942,7 +942,7 @@
|
||||
currentTimeFrame,
|
||||
currentTimeFrameLabel,
|
||||
bot.multiPeriodProcessDatetime,
|
||||
interExecutionMemoryArray[n],
|
||||
variableArray[n],
|
||||
onBotFinished);
|
||||
|
||||
function onBotFinished(err) {
|
||||
@@ -1135,7 +1135,7 @@
|
||||
|
||||
thisReport.file.lastExecution = bot.currentDaytime;
|
||||
thisReport.file.lastFile = lastFileDate;
|
||||
thisReport.file.interExecutionMemoryArray = interExecutionMemoryArray;
|
||||
thisReport.file.variableArray = variableArray;
|
||||
thisReport.save(callBack);
|
||||
|
||||
bot.hasTheBotJustStarted = false;
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function start(multiPeriodDataFiles, timeFrame, timeFrameLabel, currentDay, interExecutionMemory, callBackFunction) {
|
||||
function start(multiPeriodDataFiles, timeFrame, timeFrameLabel, currentDay, variable, callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
timeFrame,
|
||||
timeFrameLabel,
|
||||
currentDay,
|
||||
interExecutionMemory,
|
||||
variable,
|
||||
exchangeAPI,
|
||||
writeFiles,
|
||||
callBackFunction)
|
||||
|
||||
Reference in new issue
Block a user