|
@ -447,10 +447,10 @@ async function getkey(key) { |
|
|
if(reply){ |
|
|
if(reply){ |
|
|
console.log('---------fount----------') |
|
|
console.log('---------fount----------') |
|
|
//resolve(reply)
|
|
|
//resolve(reply)
|
|
|
return reply |
|
|
return 1 |
|
|
}else{ |
|
|
}else{ |
|
|
console.log('----------not fount------------') |
|
|
console.log('----------not fount------------') |
|
|
return null |
|
|
return 2 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -483,16 +483,18 @@ async function iosend(data,issend,io,pubClient,user1){ |
|
|
reslog1.date = convertDateToUTC(now) |
|
|
reslog1.date = convertDateToUTC(now) |
|
|
var user = user1 |
|
|
var user = user1 |
|
|
|
|
|
|
|
|
if(getkey(issend)){ |
|
|
var getres = await getkey(issend); |
|
|
|
|
|
|
|
|
|
|
|
if(getres == '1'){ |
|
|
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 if(getres == '2'){ |
|
|
console.log(issend + ' ---2 '+ JSON.stringify(reslog1)) |
|
|
console.log(issend + ' ---2 '+ JSON.stringify(reslog1)) |
|
|
if (setkey(issend,'1')){ |
|
|
setkey(issend,'1') |
|
|
//pubClient.set(issend, '1', function(err, res) {
|
|
|
//pubClient.set(issend, '1', function(err, res) {
|
|
|
//});
|
|
|
//});
|
|
|
io.in(user).emit("logdata", reslog1); |
|
|
io.in(user).emit("logdata", reslog1); |
|
|
} |
|
|
//}
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|