Mercurial > piecrust2
diff piecrust/baking/worker.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 | a8a12f97addf |
children | ed5ccd4cce49 |
line wrap: on
line diff
--- a/piecrust/baking/worker.py Thu Jun 25 14:51:12 2015 -0700 +++ b/piecrust/baking/worker.py Thu Jun 25 14:51:37 2015 -0700 @@ -19,10 +19,11 @@ class BakeWorkerContext(object): - def __init__(self, root_dir, out_dir, + def __init__(self, root_dir, sub_cache_dir, out_dir, work_queue, results, abort_event, force=False, debug=False): self.root_dir = root_dir + self.sub_cache_dir = sub_cache_dir self.out_dir = out_dir self.work_queue = work_queue self.results = results @@ -51,6 +52,7 @@ # Create the app local to this worker. app = PieCrust(self.ctx.root_dir, debug=self.ctx.debug) + app._useSubCacheDir(self.ctx.sub_cache_dir) app.env.fs_cache_only_for_main_page = True app.env.registerTimer("BakeWorker_%d_Total" % self.wid) app.env.registerTimer("BakeWorkerInit")