Mercurial > piecrust2
diff piecrust/baking/worker.py @ 471:5b57a189fd98
bug: Correctly setup the environment/app for bake workers.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 14 Jul 2015 23:13:16 -0700 |
parents | 456db44dcc53 |
children | 27e3b3f05648 |
line wrap: on
line diff
--- a/piecrust/baking/worker.py Tue Jul 14 23:02:56 2015 -0700 +++ b/piecrust/baking/worker.py Tue Jul 14 23:13:16 2015 -0700 @@ -41,6 +41,8 @@ # 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.config.set('baker/is_baking', True) + app.env.base_asset_url_format = '%uri%' app.env.fs_cache_only_for_main_page = True app.env.registerTimer("BakeWorker_%d_Total" % self.wid) app.env.registerTimer("BakeWorkerInit")