Cleaning File Paths
This commit is contained in:
1 parent
2350dc0b23
commit
e88f3eba99
6 files changed
+14
-18
No files matched your search
+1
-1
@@ -476,7 +476,7 @@
|
||||
dateForPath = "/" + currentDay.getUTCFullYear() + '/' + utilities.pad(currentDay.getUTCMonth() + 1, 2) + '/' + utilities.pad(currentDay.getUTCDate(), 2);
|
||||
}
|
||||
|
||||
let filePathRoot = contextSummary.dataMine + "/" + contextSummary.bot + "." + contextSummary.botVersion.major + "." + contextSummary.botVersion.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + contextSummary.dataSetVersion;
|
||||
let filePathRoot = contextSummary.dataMine + "/" + contextSummary.bot + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + contextSummary.product + "/" + contextSummary.dataset + "/" + timeFrameLabel + dateForPath;
|
||||
filePath += '/' + fileName
|
||||
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ exports.newDataSet = function newDataSet(BOT, logger) {
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] getTextFile -> Entering function."); }
|
||||
|
||||
let filePathRoot = dataDependencyNode.dataMine + "/" + dataDependencyNode.bot + "." + dataDependencyNode.botVersion.major + "." + dataDependencyNode.botVersion.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + dataDependencyNode.dataSetVersion;
|
||||
let filePathRoot = dataDependencyNode.dataMine + "/" + dataDependencyNode.bot + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + pFolderPath;
|
||||
filePath += '/' + pFileName
|
||||
|
||||
@@ -146,7 +146,7 @@ exports.newDataSet = function newDataSet(BOT, logger) {
|
||||
return;
|
||||
}
|
||||
|
||||
let filePathRoot = dataDependencyNode.dataMine + "/" + dataDependencyNode.bot + "." + dataDependencyNode.botVersion.major + "." + dataDependencyNode.botVersion.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + dataDependencyNode.dataSetVersion;
|
||||
let filePathRoot = dataDependencyNode.dataMine + "/" + dataDependencyNode.bot + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + pFolderPath + '/' + pFileName;
|
||||
|
||||
fileStorage.createTextFile(dataDependencyNode.dataMine, filePath, pFileContent, onFileCreated);
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
botConfig.loopCounter = 0;
|
||||
|
||||
/* File Path Root */
|
||||
botConfig.filePathRoot = botConfig.dataMine + "/" + botConfig.codeName + "." + botConfig.version.major + "." + botConfig.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + botConfig.exchange + "/" + botConfig.dataSetVersion;
|
||||
botConfig.filePathRoot = botConfig.dataMine + "/" + botConfig.codeName + "/" + botConfig.exchange;
|
||||
|
||||
/* Process Key */
|
||||
botConfig.processKey = global.TASK_NODE.bot.processes[processIndex].name + '-' + global.TASK_NODE.bot.processes[processIndex].type + '-' + global.TASK_NODE.bot.processes[processIndex].id
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@
|
||||
let botId = bot.dataMine + "-" + bot.codeName + "-" + bot.version.major + "-" + bot.version.minor + "-" + bot.process + "-" + bot.dataSetVersion;
|
||||
|
||||
if (ownerId !== botId) {
|
||||
let rootPath = statusDependencyNode.dataMine + "/" + statusDependencyNode.bot + "." + statusDependencyNode.botVersion.major + "." + statusDependencyNode.botVersion.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + statusDependencyNode.dataSetVersion;
|
||||
let rootPath = statusDependencyNode.dataMine + "/" + statusDependencyNode.bot + "/" + bot.exchange;
|
||||
filePath = rootPath + "/Reports/" + sessionPath + statusDependencyNode.process + timePath;
|
||||
} else {
|
||||
filePath = bot.filePathRoot + "/Reports/" + sessionPath + statusDependencyNode.process + timePath;
|
||||
|
||||
+9
-9
@@ -221,7 +221,7 @@
|
||||
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + SIMULATED_RECORDS_FOLDER_NAME + "/" + "Multi-Period-Market" + "/" + timeFrameLabel;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
fileContent = "[" + JSON.stringify(tradingSystem) + "," + fileContent + "]";
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + CONDITIONS_FOLDER_NAME + "/" + "Multi-Period-Market" + "/" + timeFrameLabel;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
fileContent = "[" + fileContent + "]";
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + STRATEGIES_FOLDER_NAME + "/" + "Multi-Period-Market" + "/" + timeFrameLabel;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
fileContent = "[" + fileContent + "]";
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + TRADES_FOLDER_NAME + "/" + "Multi-Period-Market" + "/" + timeFrameLabel;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -568,7 +568,7 @@
|
||||
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + SIMULATED_RECORDS_FOLDER_NAME + "/" + "Multi-Period-Daily" + "/" + timeFrameLabel;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -675,7 +675,7 @@
|
||||
let dateForPath = currentDay.getUTCFullYear() + '/' + utilities.pad(currentDay.getUTCMonth() + 1, 2) + '/' + utilities.pad(currentDay.getUTCDate(), 2);
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + SIMULATED_RECORDS_FOLDER_NAME + "/" + "Multi-Period-Daily" + "/" + timeFrameLabel + "/" + dateForPath;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
let dateForPath = currentDay.getUTCFullYear() + '/' + utilities.pad(currentDay.getUTCMonth() + 1, 2) + '/' + utilities.pad(currentDay.getUTCDate(), 2);
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + CONDITIONS_FOLDER_NAME + "/" + "Multi-Period-Daily" + "/" + timeFrameLabel + "/" + dateForPath;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -840,7 +840,7 @@
|
||||
let dateForPath = currentDay.getUTCFullYear() + '/' + utilities.pad(currentDay.getUTCMonth() + 1, 2) + '/' + utilities.pad(currentDay.getUTCDate(), 2);
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + STRATEGIES_FOLDER_NAME + "/" + "Multi-Period-Daily" + "/" + timeFrameLabel + "/" + dateForPath;
|
||||
filePath += '/' + fileName
|
||||
|
||||
@@ -920,7 +920,7 @@
|
||||
let dateForPath = currentDay.getUTCFullYear() + '/' + utilities.pad(currentDay.getUTCMonth() + 1, 2) + '/' + utilities.pad(currentDay.getUTCDate(), 2);
|
||||
let fileName = '' + market.baseAsset + '_' + market.quotedAsset + '.json';
|
||||
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "." + bot.version.major + "." + bot.version.minor + "/" + global.CLONE_EXECUTOR.codeName + "." + global.CLONE_EXECUTOR.version + "/" + bot.exchange + "/" + bot.dataSetVersion;
|
||||
let filePathRoot = bot.dataMine + "/" + bot.codeName + "/" + bot.exchange;
|
||||
let filePath = filePathRoot + "/Output/" + bot.SESSION.folderName + "/" + TRADES_FOLDER_NAME + "/" + "Multi-Period-Daily" + "/" + timeFrameLabel + "/" + dateForPath;
|
||||
filePath += '/' + fileName
|
||||
|
||||
|
||||
@@ -90,10 +90,6 @@ require('dotenv').config();
|
||||
|
||||
global.WRITE_LOGS_TO_FILES = process.env.WRITE_LOGS_TO_FILES
|
||||
|
||||
/* Default parameters can be changed by the execution configuration */
|
||||
|
||||
global.CLONE_EXECUTOR = { codeName: 'AACloud', version: '1.1' } // NOTE: To refactor the name of this variable you would need to go through the bots code that are using it.
|
||||
|
||||
/*
|
||||
We need to count how many process instances we deployd and how many of them have already finished their job, either
|
||||
because they just finished or because there was a request to stop the proceses. In this way, once we reach the
|
||||
|
||||
Reference in new issue
Block a user