changeset 476:27e3b3f05648

bake: Set the worker ID in the configuration. It's useful.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 19 Jul 2015 17:01:38 -0700
parents c5df200354e8
children 01f514e9e47a
files piecrust/baking/worker.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/baking/worker.py	Sun Jul 19 17:00:57 2015 -0700
+++ b/piecrust/baking/worker.py	Sun Jul 19 17:01:38 2015 -0700
@@ -42,6 +42,7 @@
         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.config.set('baker/worker_id', self.wid)
         app.env.base_asset_url_format = '%uri%'
         app.env.fs_cache_only_for_main_page = True
         app.env.registerTimer("BakeWorker_%d_Total" % self.wid)