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