# HG changeset patch # User Ludovic Chabant # Date 1464578130 25200 # Node ID 234d0c7c02cf9f8e63bde523b016ecc8febef30d # Parent 3e188d88a9ac2180c0f04e0f5a1e8f825fde5d01 bake: Add the timestamp of the page to each record entry. diff -r 3e188d88a9ac -r 234d0c7c02cf piecrust/baking/baker.py --- a/piecrust/baking/baker.py Sat May 28 15:43:45 2016 -0700 +++ b/piecrust/baking/baker.py Sun May 29 20:15:30 2016 -0700 @@ -217,6 +217,7 @@ # than the last bake. record_entry = BakeRecordEntry(res['source_name'], res['path']) record_entry.config = res['config'] + record_entry.timestamp = res['timestamp'] if res['errors']: record_entry.errors += res['errors'] record.current.success = False diff -r 3e188d88a9ac -r 234d0c7c02cf piecrust/baking/records.py --- a/piecrust/baking/records.py Sat May 28 15:43:45 2016 -0700 +++ b/piecrust/baking/records.py Sun May 29 20:15:30 2016 -0700 @@ -16,7 +16,7 @@ class BakeRecord(Record): - RECORD_VERSION = 18 + RECORD_VERSION = 19 def __init__(self): super(BakeRecord, self).__init__() @@ -78,6 +78,7 @@ self.extra_key = extra_key self.flags = self.FLAG_NONE self.config = None + self.timestamp = None self.errors = [] self.subs = [] diff -r 3e188d88a9ac -r 234d0c7c02cf piecrust/baking/worker.py --- a/piecrust/baking/worker.py Sat May 28 15:43:45 2016 -0700 +++ b/piecrust/baking/worker.py Sun May 29 20:15:30 2016 -0700 @@ -134,11 +134,13 @@ 'source_name': fac.source.name, 'path': fac.path, 'config': None, + 'timestamp': None, 'errors': None} try: page = fac.buildPage() page._load() result['config'] = page.config.getAll() + result['timestamp'] = page.datetime.timestamp() except Exception as ex: logger.debug("Got loading error. Sending it to master.") result['errors'] = _get_errors(ex)