Browse Source

redis

master
zeus 4 years ago
parent
commit
60581d00a8
  1. 3
      swarmlab-app/src/run/app.js

3
swarmlab-app/src/run/app.js

@ -409,6 +409,7 @@ function onCollection(err, collection) {
var now = new Date(); var now = new Date();
cursor.on('data', function (data) { cursor.on('data', function (data) {
console.log('+++++++++ondata<<<<<<<<<<<<<<<<<<<<<<' + data); console.log('+++++++++ondata<<<<<<<<<<<<<<<<<<<<<<' + data);
io.in('anagnostopoulos@uniwa.gr').emit("logdata", data);
var pathfileval = pathmodule.basename(data.tailed_path); var pathfileval = pathmodule.basename(data.tailed_path);
var arrfile = pathfileval.toString().split("-"); var arrfile = pathfileval.toString().split("-");
@ -448,8 +449,6 @@ function onCollection(err, collection) {
var user = resob1.res25creator var user = resob1.res25creator
console.log('datauser ' + JSON.stringify(user)); console.log('datauser ' + JSON.stringify(user));
//io.in(user).emit("logdata", reslog); //io.in(user).emit("logdata", reslog);
const sockets = await io.of('/').adapter.sockets();
console.log(sockets); // a Set containing all the connected socket ids
var user = 'anagnostopoulos@uniwa.gr' var user = 'anagnostopoulos@uniwa.gr'
io.in(user).emit("logdata", reslog); io.in(user).emit("logdata", reslog);
itemsProcessed++; itemsProcessed++;

Loading…
Cancel
Save