comparison piecrust/pipelines/_pagerecords.py @ 991:1857dbd4580f

bake: Fix bugs introduced by bake optimizations, of course. - Make the execution stats JSON-serializable. - Re-add ability to differentiate between sources used during segment rendering and during layout rendering. Fixes problems with cache invalidation of pages that use other sources. - Make taxonomy-related stuff JSON-serializable.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 20 Nov 2017 23:06:47 -0800
parents 8adc27285d93
children 298b07a899b5
comparison
equal deleted inserted replaced
990:22cf13b86cc3 991:1857dbd4580f
87 yield from self.errors 87 yield from self.errors
88 for o in self.subs: 88 for o in self.subs:
89 yield from o['errors'] 89 yield from o['errors']
90 90
91 def getAllUsedSourceNames(self): 91 def getAllUsedSourceNames(self):
92 res = set() 92 res_segments = set()
93 res_layout = set()
93 for o in self.subs: 94 for o in self.subs:
94 pinfo = o.get('render_info') 95 pinfo = o.get('render_info')
95 if pinfo: 96 if pinfo:
96 res |= pinfo['used_source_names'] 97 usn = pinfo['used_source_names']
97 return res 98 res_segments |= set(usn['segments'])
99 res_layout |= set(usn['layout'])
100 return res_segments, res_layout
98 101
99 def getAllOutputPaths(self): 102 def getAllOutputPaths(self):
100 for o in self.subs: 103 for o in self.subs:
101 yield o['out_path'] 104 yield o['out_path']
102 105