1 import time 2 import random 3 4 print "--SELFTEST-- loading test" 5 6 max = 20 7 8 def payload1(id): 9 print "--STEPTEST-- payload1 start" 10 11 time.sleep(random.randint(1, 5)) 12 13 b = job.barrier('127.0.0.1#P%d' % (id), 'here', 60) 14 b.rendezvous(*us) 15 16 print "--STEPTEST-- payload1 complete" 17 18 us = [] 19 jobs = [] 20 for n in range(1, max+1): 21 us.append('127.0.0.1#P%d' % (n)) 22 jobs.append([payload1, n]) 23 24 job.parallel(*jobs) 25