Retrying Commands to Web Socket Server if needed
This commit is contained in:
1 parent
16cbd8d80d
commit
7df0bf55e3
6 files changed
+107
-15
No files matched your search
@@ -1,4 +1,7 @@
|
||||
exports.newSystemEventHandler = function newSystemEventHandler(ipc) {
|
||||
|
||||
const MODULE = "Task Server -> System Event Handler -> "
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize,
|
||||
@@ -26,7 +29,7 @@
|
||||
ipc.of.world.on(
|
||||
'connect',
|
||||
function () {
|
||||
ipc.log('## Connected to Superalgos Event Server ##'.rainbow, ipc.config.delay);
|
||||
ipc.log(MODULE + '## Connected to Superalgos Event Server ##'.rainbow, ipc.config.delay);
|
||||
|
||||
let eventCommand = {
|
||||
action: 'greetings',
|
||||
@@ -41,7 +44,7 @@
|
||||
ipc.of.world.on(
|
||||
'disconnect',
|
||||
function () {
|
||||
ipc.log('Disconnected from Superalgos Event Server '.notice);
|
||||
ipc.log(MODULE + 'Disconnected from Superalgos Event Server '.notice);
|
||||
}
|
||||
);
|
||||
ipc.of.world.on(
|
||||
@@ -63,8 +66,8 @@
|
||||
if (handler) {
|
||||
handler.callBack(message)
|
||||
} else {
|
||||
console.log(key + ' not found so could not deliver event raised.')
|
||||
console.log(' Message = ' + data)
|
||||
console.log(MODULE + key + ' not found so could not deliver event raised.')
|
||||
console.log(MODULE + ' Message = ' + data)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user