Commit 57c1c7e1 by ken

expired

parent 88f6ec9e
......@@ -56,7 +56,7 @@ function subscribe() {
console.log(symbol + '@' + depth.timestamp * 1000 + ' latency=' + (Date.now() - depth.timestamp * 1000) + 'ms');
const publishContent = JSON.stringify({symbol, time: depth.timestamp * 1000})
const depthJson = JSON.stringify({asks: depth.asks.reverse(), bids: depth.bids, symbol})
redisClient.set(key, depthJson, 'EX', 1.5);
redisClient.set(key, depthJson, 'EX', 1);
redisClient.publish(publishKey, publishContent);
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment