这让我心烦意乱。
我有一个BLPOP,它触发下面的源代码。当源第一次被触发时,只有第一个Redis调用被触发.在出现另一个pop并再次运行源代码之前,不会触发第二个??
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);
});
});发布于 2017-02-19 03:04:44
问题在于时机..。
我把blpop放在同一个频道上,在blpop再次等待之前,只有一个命令被执行。
https://stackoverflow.com/questions/42323125
复制相似问题