我正在尝试从我的 redis 数据库中获取所有 hget 值。但阵列日志保持为空。请问各位大神可以看一下吗?谢谢
getAllHMSets = (cb) ->
client.keys "log:*", (err, logKeys) ->
if not err and logKeys isnt null
logs = new Array()
i = 0
while i < logKeys.length
client.hgetall logKeys[i], (err, log) ->
if not err and log isnt null
logs.push log
i++
if logs.length is logKeys.length
cb logs if typeof cb is "function"