From b38d32b3ca4350b119e3436f790727e960d6696b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 27 Jul 2020 12:47:54 +0200 Subject: [PATCH] Configured to not Support Time Frames --- src/DailyFiles.js | 4 ++++ src/FileCloud.js | 13 +++++++++++-- src/MarketFiles.js | 4 ++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/DailyFiles.js b/src/DailyFiles.js index 63aee23be..47c6b1ce6 100644 --- a/src/DailyFiles.js +++ b/src/DailyFiles.js @@ -126,6 +126,10 @@ function newDailyFiles () { /* It is ok, we will deal with this later */ break } + if (err.message === 'Configured to not Support This.') { + /* It is ok, we will deal with this later */ + break + } if (err.message === 'Missing Configuration.') { if (ERROR_LOG === true) { logger.write('[WARN] initialize -> onFileReceived -> The needed configuration to locate the timeFrames is missing at the dataSet.') } if (ERROR_LOG === true) { logger.write('[WARN] initialize -> onFileReceived -> Time Frames Filters will be ignored -> Product = ' + pProduct.config.codeName) } diff --git a/src/FileCloud.js b/src/FileCloud.js index 6cfb1772b..157ed7ff7 100644 --- a/src/FileCloud.js +++ b/src/FileCloud.js @@ -52,8 +52,17 @@ function newFileCloud () { } if (pTimeFrames !== undefined) { if (pDataset.config.timeFrames !== undefined) { - fileName = pDataset.config.timeFrames.fileName - filePath = pDataset.config.timeFrames.filePath + if (pDataset.config.timeFrames.fileName !== '') { + fileName = pDataset.config.timeFrames.fileName + filePath = pDataset.config.timeFrames.filePath + } else { + let customErr = { + result: GLOBAL.CUSTOM_FAIL_RESPONSE.result, + message: 'Configured to not Support This.' + } + callBackFunction(customErr) + return + } } else { let customErr = { result: GLOBAL.CUSTOM_FAIL_RESPONSE.result, diff --git a/src/MarketFiles.js b/src/MarketFiles.js index 64bd607af..15aff831b 100644 --- a/src/MarketFiles.js +++ b/src/MarketFiles.js @@ -125,6 +125,10 @@ function newMarketFiles () { /* It is ok, we will deal with this later */ break } + if (err.message === 'Configured to not Support This.') { + /* It is ok, we will deal with this later */ + break + } if (err.message === 'Missing Configuration.') { if (ERROR_LOG === true) { logger.write('[WARN] initialize -> onFileReceived -> The needed configuration to locate the timeFrames is missing at the dataSet.') } if (ERROR_LOG === true) { logger.write('[WARN] initialize -> onFileReceived -> Time Frames Filters will be ignored -> Product = ' + pProduct.config.codeName) }