zephyr_mirror: Run the class mirror in 16 parallel shards.

(imported from commit cb17ef999e94cc57d5b01114479728b04475c9c4)
This commit is contained in:
Tim Abbott 2012-11-27 10:27:02 -05:00
parent bfec56661e
commit 305a8ce569
2 changed files with 35 additions and 7 deletions

View file

@ -39,6 +39,19 @@ if options.sync_subscriptions:
subprocess.call(args)
sys.exit(0)
if options.forward_class_messages:
sys.path.append("/home/humbug/humbug")
from zephyr.lib.parallel import run_parallel
print "Starting parallel zephyr class mirroring bot"
jobs = list("0123456789abcdef")
def run_job(shard):
subprocess.call(args + ["--shard=%s" % (shard,)])
return 0
for (status, job) in run_parallel(run_job, jobs, threads=16):
print "A mirroring shard died!"
pass
sys.exit(0)
while True:
print "Starting zephyr mirroring bot"
try: