diff piecrust/processing/worker.py @ 663:3ceeca7bb71c

themes: Add support for a `--theme` argument to `chef`.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 01 Mar 2016 22:27:28 -0800
parents aefe70229fdd
children 81d9c3a3a0b5
line wrap: on
line diff
--- a/piecrust/processing/worker.py	Tue Mar 01 22:27:04 2016 -0800
+++ b/piecrust/processing/worker.py	Tue Mar 01 22:27:28 2016 -0800
@@ -23,13 +23,14 @@
 
 
 class ProcessingWorkerContext(object):
-    def __init__(self, root_dir, out_dir, tmp_dir,
-                 force=False, debug=False):
+    def __init__(self, root_dir, out_dir, tmp_dir, *,
+                 force=False, debug=False, theme_site=False):
         self.root_dir = root_dir
         self.out_dir = out_dir
         self.tmp_dir = tmp_dir
         self.force = force
         self.debug = debug
+        self.theme_site = theme_site
         self.is_profiling = False
         self.enabled_processors = None
         self.additional_processors = None
@@ -59,7 +60,8 @@
 
     def initialize(self):
         # Create the app local to this worker.
-        app = PieCrust(self.ctx.root_dir, debug=self.ctx.debug)
+        app = PieCrust(self.ctx.root_dir, debug=self.ctx.debug,
+                       theme_site=self.ctx.theme_site)
         app.env.registerTimer("PipelineWorker_%d_Total" % self.wid)
         app.env.registerTimer("PipelineWorkerInit")
         app.env.registerTimer("JobReceive")