I am trying to use redis sorted set command zadd. But saving the error on startup when I run this script:
var ts = Math.round(Date.now() / 1000)
, key = 'usr::' + dest.ID + '::msgs'
, id = uuid.v1();
var notify = {
msg: response.msg,
from: response.from ? response.from : null,
type: response.type ? response.type : null,
date: ts,
read: 0
}
client.zadd(key, ts, JSON.stringify(notify), function (err, response) {
if (err) throw err;
});
Is there something wrong with this code?
By the way :: what I'm trying to accomplish is a notification / incoming message system ... Therefore, it’s better to save time by asking me how you can help, and finally you won’t do this: (
ERROR: ERR operation against keystroke
source
share