Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created May 7, 2012 23:28
Show Gist options
  • Select an option

  • Save arockwell/2631408 to your computer and use it in GitHub Desktop.

Select an option

Save arockwell/2631408 to your computer and use it in GitHub Desktop.
blpop in node
count = 0
watch_redis = ->
console.log("inside watch_redis")
redis.blpop "test", 0, (err, data) ->
count = count + 1
redis.lpush "tset", count
console.log("We pushed something! #{count}")
process.nextTick(watch_redis)
watch_redis()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment