|
|
@ -433,28 +433,27 @@ function getSHA256ofJSON(input){ |
|
|
|
|
|
|
|
//var getkey = function getkey(key) {
|
|
|
|
async function getkey(key) { |
|
|
|
//return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
|
|
|
await pubClient.get(key, function (err, reply) { |
|
|
|
pubClient.get(key, function (err, reply) { |
|
|
|
if(err){ |
|
|
|
|
|
|
|
console.log('----------error------------') |
|
|
|
|
|
|
|
//resolve(null)
|
|
|
|
return null |
|
|
|
resolve(null) |
|
|
|
} |
|
|
|
else { |
|
|
|
if(reply){ |
|
|
|
console.log('---------fount----------') |
|
|
|
//resolve(reply)
|
|
|
|
return 1 |
|
|
|
resolve(1) |
|
|
|
}else{ |
|
|
|
console.log('----------not fount------------') |
|
|
|
return 2 |
|
|
|
resolve(2) |
|
|
|
//return 2
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
//})
|
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
var setkey = function setkv(key,value){ |
|
|
|