def main():
    pubsub = PubSub(pool)
    pubsub.subscribe(['foo'])
    threading.Thread(target=changeFoo).start()
    for t in pubsub.listen():
        print t
示例#2
0
文件: main.py 项目: qingwei5732/logs
 def open(self, *args, **kwargs):
     self.pubsub = PubSub(REDIS_CONNECTION_POOL,
                          ignore_subscribe_messages=True)
     self.client = self.request.connection.context.address
     print("opened")