Advertisement
Guest User

Untitled

a guest
Jul 29th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import redis
  2.  
  3. client = redis.StrictRedis('host_ip', db=1)
  4. channel = client.connect()
  5. channel.subscribe('channel_name')
  6.  
  7. # we need to listen to channel.listen to non block it
  8. # This code is blocking
  9. for msg in channel.listen():
  10.     print msg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement