changeset 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 c582746cb7eb
children dc78ade3f320
files piecrust/baking/worker.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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")