节点Redis命令不会运行?
问题描述:
这让我难以置信。节点Redis命令不会运行?
我有触发下面的下面的源代码BLPOP。当第一次触发源时,只有第一个Redis调用被触发......第二个不会被触发,直到有另一个弹出并且源代码再次运行?
null
DEBUG - 8621 - Sat Feb 18 2017 20:47:53 GMT-0600 (CST) - 5 totalConnections 2000
null
DEBUG - 8621 - Sat Feb 18 2017 20:47:54 GMT-0600 (CST) - 5 expectedConnections 500
null
DEBUG - 8621 - Sat Feb 18 2017 20:47:54 GMT-0600 (CST) - 5 totalConnections 2100
来源
const expectedConnectionsKey = ['test', id, 'expectedConnections'].join(':');
const totalConnectionsKey = ['test', id, 'connections'].join(':');
watcher.client.incrby(totalConnectionsKey, connections, (error, totalConnections) => {
console.log(error);
log.debug(id, 'totalConnections', totalConnections);
watcher.client.get(expectedConnectionsKey, (error, expectedConnections) => {
console.log(error);
log.debug(id, 'expectedConnections', expectedConnections);
});
});
答
问题是具有定时...
我曾在同一信道上的BLPOP,只有其中一个命令之前BLPOP开始等待再次得到了执行。