Closed JackyChou closed 10 years ago
Now I use this code:
def handle_message(msg):
print 'hello world'
yield gen.Task(client.subscribe, 'channel_one')
client.listen(handle_message)
yield gen.Task(client.psubscribe, 'channel_two'+'/*')
it works well. I should call listen afrer call subscribe or psubscribe at the first time.
When I use 'subscribe' and 'psubscribe' with Python2.7,there is someting wrong. My code look like:
But this code can't triggers the callback function when it received message. Then I delete the code
in 'client._subscribe' .Then it works well.