We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Interaction between WebWorker-Controller-WebSocket:
// DEFINTION worker.on('message', function(obj) { //console.log('CallWorker: ' + obj); framework.global.cron_job = obj; framework.emit('custom-worker', obj); });
// DEFINTION
worker.on('message', function(obj) {
//console.log('CallWorker: ' + obj);
framework.global.cron_job = obj;
framework.emit('custom-worker', obj);
});
// CONTROLLER function some_websocket_action() { var self = this; var handler = function(obj) { self.send(obj); }; framework.on('custom-worker', handler); self.on('destroy', function() { framework.removeListener('custom-worker', handler); });
// CONTROLLER
function some_websocket_action() {
var self = this;
var handler = function(obj) {
self.send(obj);
};
framework.on('custom-worker', handler);
self.on('destroy', function() {
framework.removeListener('custom-worker', handler);
}