Esempio n. 1
0
 def run(client, data):
     random.seed()
     yield sleep_async(15 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Esempio n. 2
0
 def run(client, data):
     random.seed()
     yield sleep_async(3 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Esempio n. 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)
Esempio n. 4
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)