Mercurial > piecrust2
diff piecrust/baking/worker.py @ 876:d1095774bfcf
refactor: Fix some issues with record/cache entry collisions, add counters.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 15 Jun 2017 07:33:40 -0700 |
parents | 504ddb370df8 |
children | bf65a1a6992a |
line wrap: on
line diff
--- a/piecrust/baking/worker.py Thu Jun 15 07:32:19 2017 -0700 +++ b/piecrust/baking/worker.py Thu Jun 15 07:33:40 2017 -0700 @@ -80,14 +80,15 @@ ppinfo = self.ppmngr.getPipeline(job.source_name) pp = ppinfo.pipeline + runctx = PipelineJobRunContext(job, pp.record_name, + self.record_histories) + ppres = PipelineJobResult() # For subsequent pass jobs, there will be a record entry given. For # first pass jobs, there's none so we get the pipeline to create it. ppres.record_entry = job.data.get('record_entry') if ppres.record_entry is None: - ppres.record_entry = pp.createRecordEntry(job) - - runctx = PipelineJobRunContext(job, pp, self.record_histories) + ppres.record_entry = pp.createRecordEntry(job, runctx) pp.run(job, runctx, ppres) return ppres