node-redis
node-redis copied to clipboard
set key using setnx success in 2 different child process at the same time
Hi All,
i have 2 child process that set the same key using setnx. why i get both process returned 1?
thank you
jimmy
Hi @jimsproject -- I don't see the same thing. Perhaps you're confusing the sync reply for the command being queued with the async reply in the callback?
When I try:
Client 1:
> c.setnx("12341234", "foo", console.log)
true
> null 1
Client 2:
> c.setnx("12341234", "blah blah", console.log)
true
> null 0
Perhaps you could show us the code you're using?