comparison piecrust/processing/records.py @ 191:308d5180bf81

processing: Add more information to the pipeline record. We now save whether an asset was processed by an external tool that bypasses the pipeline, and the tree of processor names involved.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 11 Jan 2015 23:01:21 -0800
parents 9e4c2e68a129
children a47580a0955b
comparison
equal deleted inserted replaced
190:430ee5b80962 191:308d5180bf81
1 import os.path 1 import os.path
2 from piecrust.records import Record, TransitionalRecord 2 from piecrust.records import Record, TransitionalRecord
3 3
4 4
5 class ProcessorPipelineRecord(Record): 5 class ProcessorPipelineRecord(Record):
6 RECORD_VERSION = 2 6 RECORD_VERSION = 3
7 7
8 def __init__(self): 8 def __init__(self):
9 super(ProcessorPipelineRecord, self).__init__() 9 super(ProcessorPipelineRecord, self).__init__()
10 self.out_dir = None 10 self.out_dir = None
11 self.process_time = None 11 self.process_time = None
32 32
33 33
34 FLAG_NONE = 0 34 FLAG_NONE = 0
35 FLAG_PROCESSED = 2**0 35 FLAG_PROCESSED = 2**0
36 FLAG_OVERRIDEN = 2**1 36 FLAG_OVERRIDEN = 2**1
37 FLAG_BYPASSED_STRUCTURED_PROCESSING = 2**2
37 38
38 39
39 class ProcessorPipelineRecordEntry(object): 40 class ProcessorPipelineRecordEntry(object):
40 def __init__(self, base_dir, rel_input): 41 def __init__(self, base_dir, rel_input):
41 self.base_dir = base_dir 42 self.base_dir = base_dir
42 self.rel_input = rel_input 43 self.rel_input = rel_input
43 44
44 self.flags = FLAG_NONE 45 self.flags = FLAG_NONE
45 self.rel_outputs = [] 46 self.rel_outputs = []
47 self.proc_tree = None
46 self.errors = [] 48 self.errors = []
47 49
48 @property 50 @property
49 def path(self): 51 def path(self):
50 return os.path.join(self.base_dir, self.rel_input) 52 return os.path.join(self.base_dir, self.rel_input)