comparison piecrust/baking/baker.py @ 425:afeebdd9f767

bake: Pass the sub-cache directory to the bake workers.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 25 Jun 2015 14:51:37 -0700
parents 4a43d7015b75
children ed5ccd4cce49
comparison
equal deleted inserted replaced
424:5feb71d31a4f 425:afeebdd9f767
546 from piecrust.baking.worker import BakeWorkerContext, worker_func 546 from piecrust.baking.worker import BakeWorkerContext, worker_func
547 547
548 pool = _WorkerPool() 548 pool = _WorkerPool()
549 for i in range(self.num_workers): 549 for i in range(self.num_workers):
550 ctx = BakeWorkerContext( 550 ctx = BakeWorkerContext(
551 self.app.root_dir, self.out_dir, 551 self.app.root_dir, self.app.cache.base_dir, self.out_dir,
552 pool.queue, pool.results, pool.abort_event, 552 pool.queue, pool.results, pool.abort_event,
553 force=self.force, debug=self.app.debug) 553 force=self.force, debug=self.app.debug)
554 w = multiprocessing.Process( 554 w = multiprocessing.Process(
555 name='BakeWorker_%d' % i, 555 name='BakeWorker_%d' % i,
556 target=worker_func, args=(i, ctx)) 556 target=worker_func, args=(i, ctx))