comparison piecrust/pipelines/base.py @ 877:d6d35b2efd04

bake: Rename "pass" to "step" and make the page pipeline use different steps. That pipeline is now first loading all pages, and then rendering full pages unless they trigger a sub-render.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 15 Jun 2017 22:16:23 -0700
parents d1095774bfcf
children 8adc27285d93
comparison
equal deleted inserted replaced
876:d1095774bfcf 877:d6d35b2efd04
37 """ 37 """
38 def __init__(self, pipeline, content_item): 38 def __init__(self, pipeline, content_item):
39 self.source_name = pipeline.source.name 39 self.source_name = pipeline.source.name
40 self.record_name = pipeline.record_name 40 self.record_name = pipeline.record_name
41 self.content_item = content_item 41 self.content_item = content_item
42 self.step_num = 0
42 self.data = {} 43 self.data = {}
43 44
44 45
45 class PipelineJobCreateContext: 46 class PipelineJobCreateContext:
46 """ Context for create pipeline baking jobs. 47 """ Context for create pipeline baking jobs.
47 """ 48 """
48 def __init__(self, pass_num, record_histories): 49 def __init__(self, step_num, record_histories):
49 self.pass_num = pass_num 50 self.step_num = step_num
50 self.record_histories = record_histories 51 self.record_histories = record_histories
51 52
52 53
53 class PipelineJobRunContext: 54 class PipelineJobRunContext:
54 """ Context for running pipeline baking jobs. 55 """ Context for running pipeline baking jobs.
80 class PipelineJobResult: 81 class PipelineJobResult:
81 """ Result of running a pipeline on a content item. 82 """ Result of running a pipeline on a content item.
82 """ 83 """
83 def __init__(self): 84 def __init__(self):
84 self.record_entry = None 85 self.record_entry = None
85 self.next_pass_job = None 86 self.next_step_job = None
86 87
87 88
88 class PipelineMergeRecordContext: 89 class PipelineMergeRecordContext:
89 """ The context for merging a record entry for a second or higher pass 90 """ The context for merging a record entry for a second or higher pass
90 into the bake record. 91 into the bake record.
91 """ 92 """
92 def __init__(self, record, job, pass_num): 93 def __init__(self, record, job, step_num):
93 self.record = record 94 self.record = record
94 self.job = job 95 self.job = job
95 self.pass_num = pass_num 96 self.step_num = step_num
96 97
97 98
98 class PipelinePostJobRunContext: 99 class PipelinePostJobRunContext:
99 def __init__(self, record_history): 100 def __init__(self, record_history):
100 self.record_history = record_history 101 self.record_history = record_history