示例#1
0
 def run(client, data):
     random.seed()
     yield sleep_async(15 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
示例#2
0
文件: handlers.py 项目: bwsw/moebius
 def run(client, data):
     random.seed()
     yield sleep_async(3 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
示例#3
0
 def run(client, data):
     d = json.loads(data)
     for i in range(3):
         print "%d: Got %s from [%s]" % (i, d['message'], client.id)
         yield sleep_async(1)
示例#4
0
文件: handlers.py 项目: bwsw/moebius
 def run(client, data):
     d = json.loads(data)
     for i in range(3):
         print "%d: Got %s from [%s]" % (i, d['message'], client.id)
         yield sleep_async(1)