1 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
17 from config import config, init_conf
19 # return list of binary builders in fair-queue order
20 # it is determined based upon spool/got_lock file, which is also
25 for b in config.binary_builders:
29 lck = lock.lock("got-lock")
30 f = open(path.got_lock_file, "r+")
39 log.alert("found strange lock in got-lock: %s" % b)
42 return util.cmp(bs[b1], bs[b2])
44 bl.sort(key=util.cmp_to_key(mycmp))
48 for l in bl: f.write(l + "\n")
54 def run_rpm_builder(b):
58 rpm_builder.main_for(b)
63 for b in builders_order():
65 # give builder some time to aquire lock
67 # wait for children to die out
73 if __name__ == '__main__':