Separeted Logs, timeperiod FIX
This commit is contained in:
1 parent
1ab5bc2043
commit
3f6d8f2966
4 files changed
+25
-7
No files matched your search
@@ -120,7 +120,14 @@ exports.newFileStorage = function newFileStorage(logger) {
|
||||
let host = await getDevTeamHost(container)
|
||||
|
||||
if (host.url.indexOf('localhost') !== -1) {
|
||||
let fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath
|
||||
let fileLocation
|
||||
|
||||
if (filePath.indexOf("/Logs/") > 0) {
|
||||
fileLocation = process.env.LOG_PATH + '/' + container + '/' + filePath
|
||||
} else {
|
||||
fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath
|
||||
}
|
||||
|
||||
logInfo('createTextFile: ' + fileLocation)
|
||||
let directoryPath = fileLocation.substring(0, fileLocation.lastIndexOf('/') + 1);
|
||||
mkDirByPathSync(directoryPath)
|
||||
|
||||
+2
-1
@@ -372,10 +372,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
let timePeriodFilter = global.EXECUTION_CONFIG.timePeriodFileStorage
|
||||
let timePeriodFilter = global.EXECUTION_CONFIG.timePeriodFilter
|
||||
if (timePeriodFilter !== undefined) {
|
||||
if (timePeriodFilter.indexOf(outputPeriodLabel) === -1) {
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimePeriods -> periodsLoopBody -> Discarding period for being filtered out. -> outputPeriodLabel = " + outputPeriodLabel); }
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimePeriods -> periodsLoopBody -> Discarding period for being filtered out. -> timePeriodFilter = " + timePeriodFilter); }
|
||||
periodsControlLoop();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
let dependencyIndex = 0;
|
||||
dataFiles = [];
|
||||
|
||||
let timePeriodFilter = global.EXECUTION_CONFIG.timePeriodFileStorage
|
||||
let timePeriodFilter = global.EXECUTION_CONFIG.timePeriodFilter
|
||||
if (timePeriodFilter !== undefined) {
|
||||
if (timePeriodFilter.indexOf(outputPeriodLabel) === -1) {
|
||||
periodsControlLoop();
|
||||
|
||||
@@ -130,7 +130,7 @@ async function readExecutionConfiguration(execution) {
|
||||
try {
|
||||
console.log("[INFO] Run -> readExecutionConfiguration -> Entering function. ");
|
||||
|
||||
let timePeriod
|
||||
let timePeriodFilter
|
||||
let botProcess
|
||||
|
||||
/* Try to get the begin and end dates from the Definition */
|
||||
@@ -162,13 +162,13 @@ async function readExecutionConfiguration(execution) {
|
||||
/* Here we only look for one timePeriod, in the future we will be able to process the whole array, but not for now. */
|
||||
if (definition.simulationParams.timePeriodDailyArray !== undefined) {
|
||||
if (definition.simulationParams.timePeriodDailyArray.length > 0) {
|
||||
timePeriod = definition.simulationParams.timePeriodDailyArray[0]
|
||||
timePeriodFilter = definition.simulationParams.timePeriodDailyArray[0]
|
||||
botProcess = "Multi-Period-Daily"
|
||||
}
|
||||
}
|
||||
if (definition.simulationParams.timePeriodMarketArray !== undefined) {
|
||||
if (definition.simulationParams.timePeriodMarketArray.length > 0) {
|
||||
timePeriod = definition.simulationParams.timePeriodMarketArray[0]
|
||||
timePeriodFilter = definition.simulationParams.timePeriodMarketArray[0]
|
||||
botProcess = "Multi-Period-Market"
|
||||
}
|
||||
}
|
||||
@@ -307,15 +307,25 @@ async function readExecutionConfiguration(execution) {
|
||||
repo: global.CURRENT_BOT_REPO
|
||||
}
|
||||
|
||||
if (timePeriod === undefined) { timePeriod = process.env.TIME_PERIOD } // Only use the .env when nothing comes at Definition.json
|
||||
let timePeriod
|
||||
if (timePeriodFilter === undefined) {
|
||||
timePeriod = process.env.TIME_PERIOD
|
||||
} else {
|
||||
timePeriod = timePeriodFilter
|
||||
}
|
||||
|
||||
global.EXECUTION_CONFIG = {
|
||||
cloneToExecute: cloneToExecute,
|
||||
startMode: startMode,
|
||||
timePeriod: getTimePeriod(timePeriod),
|
||||
timePeriodFileStorage: timePeriod,
|
||||
timePeriodFilter: timePeriodFilter,
|
||||
dataSet: process.env.DATA_SET
|
||||
};
|
||||
|
||||
timePeriodFilter = undefined
|
||||
timePeriod = undefined
|
||||
|
||||
global.CLONE_EXECUTOR = {
|
||||
codeName: 'AACloud',
|
||||
version: '1.1'
|
||||
|
||||
Reference in new issue
Block a user