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

+4 -4
View File
@@ -534,7 +534,7 @@
logger.persist();
}
global.EVENT_SERVER_CLIENT.raiseEvent(bot.TRADING_SESSIONKey, 'Stopped')
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.TRADING_SESSIONKey, 'Stopped')
processStopped()
return;
}
@@ -648,14 +648,14 @@
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 @@
function sessionStopped() {
if (bot.TRADING_SESSION_STATUS === 'Running') {
global.EVENT_SERVER_CLIENT.raiseEvent(bot.TRADING_SESSIONKey, 'Stopped')
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(bot.TRADING_SESSIONKey, 'Stopped')
bot.TRADING_SESSION_STATUS = 'Stopped'
}
}