TASK_IS_STOPPING

This commit is contained in:
Luis Fernando Molina committed 2020-11-28 09:43:14 +01:00
1 parent 58c58b706d
commit a57374783a
17 files changed
+47 -31

No files matched your search

@@ -184,7 +184,7 @@ exports.newLearningBot = function newLearningBot(bot, parentLogger) {
case TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE.result: {
logger.write(MODULE_NAME, "[INFO] run -> loop -> startProcessExecutionEvents -> onStarted -> Execution finished well.");
if (global.STOP_TASK_GRACEFULLY === true) {
if (TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING === true) {
loopControl()
return
}
@@ -617,7 +617,7 @@ exports.newLearningBot = function newLearningBot(bot, parentLogger) {
function shallWeStop(stopCallBack, continueCallBack) {
try {
/* IMPORTANT: This function is exactly the same on the 3 modules. */
if (!global.STOP_TASK_GRACEFULLY) {
if (!TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING) {
continueCallBack();
} else {
stopCallBack();
@@ -536,7 +536,7 @@ exports.newLearningProcess = function newLearningProcess(bot, logger, UTILITIES)
function checkStopTaskGracefully() {
/* Validation that we dont need to stop. */
if (global.STOP_TASK_GRACEFULLY === true) {
if (TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING === true) {
return false
}
}