|
@ -445,9 +445,10 @@ var getkey = function getkey(key) { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var setkey = function setkv(key,value,expire){ |
|
|
var setkey = function setkv(key,value){ |
|
|
return new Promise((resolve)=>{ |
|
|
return new Promise((resolve)=>{ |
|
|
pubClient.set(key,value, 'EX', expire, function(err,reply){ |
|
|
//pubClient.set(key,value, 'EX', expire, function(err,reply){
|
|
|
|
|
|
pubClient.set(key,value, function(err,reply){ |
|
|
if(err){ |
|
|
if(err){ |
|
|
resolve(null) |
|
|
resolve(null) |
|
|
} |
|
|
} |
|
@ -474,9 +475,9 @@ async function iosend(data,issend,io,pubClient,user1){ |
|
|
console.log(issend + ' ---1 '+ JSON.stringify(reslog1)) |
|
|
console.log(issend + ' ---1 '+ JSON.stringify(reslog1)) |
|
|
//io.in(user).emit("logdata", reslog1);
|
|
|
//io.in(user).emit("logdata", reslog1);
|
|
|
}else{ |
|
|
}else{ |
|
|
//await setkey(issend)
|
|
|
await setkey(issend,'1') |
|
|
await pubClient.set(issend, '1', function(err, res) { |
|
|
//await pubClient.set(issend, '1', function(err, res) {
|
|
|
}); |
|
|
//});
|
|
|
console.log(issend + ' ---2 '+ JSON.stringify(reslog1)) |
|
|
console.log(issend + ' ---2 '+ JSON.stringify(reslog1)) |
|
|
io.in(user).emit("logdata", reslog1); |
|
|
io.in(user).emit("logdata", reslog1); |
|
|
} |
|
|
} |
|
|