Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import redis
- client = redis.StrictRedis('host_ip', db=1)
- channel = client.connect()
- channel.subscribe('channel_name')
- # we need to listen to channel.listen to non block it
- # This code is blocking
- for msg in channel.listen():
- print msg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement