Mercurial > piecrust2
comparison piecrust/processing/worker.py @ 691:9ae9390192da
bake: Use standard pickle and queue for now to fix some small issues.
* JSON leads to some problems with integers as keys.
* Add some stats to the baking process.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 21 Mar 2016 22:28:57 -0700 |
parents | 61d606fbc313 |
children |
comparison
equal
deleted
inserted
replaced
690:f7207f4dab82 | 691:9ae9390192da |
---|---|
133 # Need to strip out colored errors from external processes. | 133 # Need to strip out colored errors from external processes. |
134 result.errors = _get_errors(ex, strip_colors=True) | 134 result.errors = _get_errors(ex, strip_colors=True) |
135 | 135 |
136 return result | 136 return result |
137 | 137 |
138 def getReport(self): | 138 def getReport(self, pool_reports): |
139 # Invoke post-processors. | 139 # Invoke post-processors. |
140 pipeline_ctx = PipelineContext(self.wid, self.app, self.ctx.out_dir, | 140 pipeline_ctx = PipelineContext(self.wid, self.app, self.ctx.out_dir, |
141 self.ctx.tmp_dir, self.ctx.force) | 141 self.ctx.tmp_dir, self.ctx.force) |
142 for proc in self.processors: | 142 for proc in self.processors: |
143 proc.onPipelineEnd(pipeline_ctx) | 143 proc.onPipelineEnd(pipeline_ctx) |
144 | 144 |
145 self.app.env.stepTimerSince("PipelineWorker_%d_Total" % self.wid, | 145 self.app.env.stepTimerSince("PipelineWorker_%d_Total" % self.wid, |
146 self.work_start_time) | 146 self.work_start_time) |
147 data = self.app.env.getStats() | 147 data = self.app.env.getStats() |
148 data.timers.update(pool_reports) | |
148 return { | 149 return { |
149 'type': 'stats', | 150 'type': 'stats', |
150 'data': data} | 151 'data': data} |
151 | 152 |
152 | 153 |