Refactoring

This commit is contained in:
Luis Fernando Molina committed 2020-11-25 16:20:21 +01:00
1 parent e3c1156a43
commit 56b4c7dfae
15 files changed
+65 -65

No files matched your search

@@ -534,7 +534,7 @@ exports.newLearningBot = function newLearningBot(bot, parentLogger) {
logger.persist();
}
global.EVENT_SERVER_CLIENT.raiseEvent(bot.sessionKey, 'Stopped')
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.sessionKey, 'Stopped')
processStopped()
return;
}
@@ -648,14 +648,14 @@ exports.newLearningBot = function newLearningBot(bot, parentLogger) {
percentage: percentage,
status: status
}
global.EVENT_SERVER_CLIENT.raiseEvent(bot.processKey, 'Heartbeat', event)
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.processKey, 'Heartbeat', event)
}
function processStopped() {
if (global.unexpectedError !== undefined) {
global.PROCESS_ERROR(bot.processKey, undefined, "An unexpected error caused the Process to stop.")
} else {
global.EVENT_SERVER_CLIENT.raiseEvent(bot.processKey, 'Stopped')
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.processKey, 'Stopped')
}
sessionStopped()
logger.persist();
@@ -670,7 +670,7 @@ exports.newLearningBot = function newLearningBot(bot, parentLogger) {
function sessionStopped() {
if (bot.SESSION_STATUS === 'Running') {
global.EVENT_SERVER_CLIENT.raiseEvent(bot.sessionKey, 'Stopped')
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.sessionKey, 'Stopped')
bot.SESSION_STATUS = 'Stopped'
}
}