diff --git a/ExtractionBotProcessMainLoop.js b/ExtractionBotProcessMainLoop.js index 2a9c69865..73d5a4eb7 100644 --- a/ExtractionBotProcessMainLoop.js +++ b/ExtractionBotProcessMainLoop.js @@ -610,11 +610,17 @@ function onFileReceived(err, text) { if (err.result !== global.DEFAULT_OK_RESPONSE.result) { + + /* + If for any reason this config file cannot be read, we are not going to abort the loop for that. Instead we are going to assume + that there are no instructions to stop and we will keep the show running. + */ + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> err.message = " + err.message); - logger.persist(); - clearInterval(intervalHandle); - clearTimeout(timeoutHandle); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> The config file cound not be read. "); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> We will ignore its content and continue running the loop. "); + + continueCallBack(); return; } diff --git a/IndicatorBotProcessMainLoop.js b/IndicatorBotProcessMainLoop.js index a1c965857..e2468d049 100644 --- a/IndicatorBotProcessMainLoop.js +++ b/IndicatorBotProcessMainLoop.js @@ -587,11 +587,17 @@ function onFileReceived(err, text) { if (err.result !== global.DEFAULT_OK_RESPONSE.result) { + + /* + If for any reason this config file cannot be read, we are not going to abort the loop for that. Instead we are going to assume + that there are no instructions to stop and we will keep the show running. + */ + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> err.message = " + err.message); - logger.persist(); - clearInterval(intervalHandle); - clearTimeout(timeoutHandle); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> The config file cound not be read. "); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> We will ignore its content and continue running the loop. "); + + continueCallBack(); return; } diff --git a/TradingBotProcessMainLoop.js b/TradingBotProcessMainLoop.js index 03c4cd178..af52b8ce2 100644 --- a/TradingBotProcessMainLoop.js +++ b/TradingBotProcessMainLoop.js @@ -1020,11 +1020,17 @@ function onFileReceived(err, text) { if (err.result !== global.DEFAULT_OK_RESPONSE.result) { + + /* + If for any reason this config file cannot be read, we are not going to abort the loop for that. Instead we are going to assume + that there are no instructions to stop and we will keep the show running. + */ + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> err.message = " + err.message); - logger.persist(); - clearInterval(intervalHandle); - clearTimeout(timeoutHandle); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> The config file cound not be read. "); + logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onFileReceived -> We will ignore its content and continue running the loop. "); + + continueCallBack(); return; }