Mercurial > piecrust2
comparison piecrust/pipelines/page.py @ 1026:d85de09f40c7
bake: Fix bug with postponed pages due to them using other sources.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 25 Dec 2017 19:01:27 -0800 |
parents | 298b07a899b5 |
children | 3bcb2d446397 |
comparison
equal
deleted
inserted
replaced
1025:c8366fc15043 | 1026:d85de09f40c7 |
---|---|
183 new_entry.timestamp = result['timestamp'] | 183 new_entry.timestamp = result['timestamp'] |
184 ctx.record.addEntry(new_entry) | 184 ctx.record.addEntry(new_entry) |
185 else: | 185 else: |
186 # Update the entry with the new information. | 186 # Update the entry with the new information. |
187 existing = ctx.record_entry | 187 existing = ctx.record_entry |
188 merge_job_result_into_record_entry(existing, result) | 188 if not result.get('postponed', False): |
189 | 189 merge_job_result_into_record_entry(existing, result) |
190 if existing.was_any_sub_baked: | 190 if existing.was_any_sub_baked: |
191 ctx.record.user_data['dirty_source_names'].add(self.source.name) | 191 ctx.record.user_data['dirty_source_names'].add(self.source.name) |
192 | 192 |
193 def run(self, job, ctx, result): | 193 def run(self, job, ctx, result): |
194 pass_num = job.get('pass_num', 0) | 194 pass_num = job.get('pass_num', 0) |
244 result['flags'] |= PagePipelineRecordEntry.FLAG_IS_DRAFT | 244 result['flags'] |= PagePipelineRecordEntry.FLAG_IS_DRAFT |
245 | 245 |
246 def _renderOrPostpone(self, job, ctx, result): | 246 def _renderOrPostpone(self, job, ctx, result): |
247 # See if we should immediately kick this job off to the next step. | 247 # See if we should immediately kick this job off to the next step. |
248 if job.get('uses_sources', False): | 248 if job.get('uses_sources', False): |
249 result['postponed'] = True | |
249 result['next_step_job'] = create_job(self, job['job_spec'][1]) | 250 result['next_step_job'] = create_job(self, job['job_spec'][1]) |
250 return | 251 return |
251 | 252 |
252 # Here our job is to render the page's segments so that they're | 253 # Here our job is to render the page's segments so that they're |
253 # cached in memory and on disk... unless we detect that the page | 254 # cached in memory and on disk... unless we detect that the page |