javascript - Attach to a Socket.io server instance in a background task -


i using socket.io in conjunction express in web application this:

var server = express(); var http = require('http').server(server); io = require('socket.io')(http); ... server.set('port', process.env.port || 3000);  http.listen(server.get('port'), function() {     console.log('listening on port ' + server.get('port')); }); 

this works totally fine. however, using kue (a job queue system) queue web workers in totally separate thread. need emit messages clients attached socket.io instance shown above web worker. pretty stuck.

does know how this?


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -