comparison piecrust/baking/worker.py @ 721:234d0c7c02cf

bake: Add the timestamp of the page to each record entry.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 May 2016 20:15:30 -0700
parents ab5c6a8ae90a
children c3cb2f9df882
comparison
equal deleted inserted replaced
720:3e188d88a9ac 721:234d0c7c02cf
132 self.app.env.addManifestEntry('LoadJobs', fac.ref_spec) 132 self.app.env.addManifestEntry('LoadJobs', fac.ref_spec)
133 result = { 133 result = {
134 'source_name': fac.source.name, 134 'source_name': fac.source.name,
135 'path': fac.path, 135 'path': fac.path,
136 'config': None, 136 'config': None,
137 'timestamp': None,
137 'errors': None} 138 'errors': None}
138 try: 139 try:
139 page = fac.buildPage() 140 page = fac.buildPage()
140 page._load() 141 page._load()
141 result['config'] = page.config.getAll() 142 result['config'] = page.config.getAll()
143 result['timestamp'] = page.datetime.timestamp()
142 except Exception as ex: 144 except Exception as ex:
143 logger.debug("Got loading error. Sending it to master.") 145 logger.debug("Got loading error. Sending it to master.")
144 result['errors'] = _get_errors(ex) 146 result['errors'] = _get_errors(ex)
145 if self.ctx.app.debug: 147 if self.ctx.app.debug:
146 logger.exception(ex) 148 logger.exception(ex)