Mercurial > piecrust2
comparison piecrust/processing/base.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 | 154b8df04829 |
comparison
equal
deleted
inserted
replaced
190:430ee5b80962 | 191:308d5180bf81 |
---|---|
7 import threading | 7 import threading |
8 from queue import Queue, Empty | 8 from queue import Queue, Empty |
9 from piecrust.chefutil import format_timed | 9 from piecrust.chefutil import format_timed |
10 from piecrust.processing.records import ( | 10 from piecrust.processing.records import ( |
11 ProcessorPipelineRecordEntry, TransitionalProcessorPipelineRecord, | 11 ProcessorPipelineRecordEntry, TransitionalProcessorPipelineRecord, |
12 FLAG_PROCESSED, FLAG_OVERRIDEN) | 12 FLAG_PROCESSED, FLAG_OVERRIDEN, FLAG_BYPASSED_STRUCTURED_PROCESSING) |
13 from piecrust.processing.tree import (ProcessingTreeBuilder, | 13 from piecrust.processing.tree import ( |
14 ProcessingTreeRunner, ProcessingTreeError, STATE_DIRTY, print_node) | 14 ProcessingTreeBuilder, ProcessingTreeRunner, ProcessingTreeError, |
15 STATE_DIRTY, | |
16 print_node, get_node_name_tree) | |
15 | 17 |
16 | 18 |
17 logger = logging.getLogger(__name__) | 19 logger = logging.getLogger(__name__) |
18 | 20 |
19 | 21 |
322 return | 324 return |
323 | 325 |
324 print_node(tree_root, recursive=True) | 326 print_node(tree_root, recursive=True) |
325 leaves = tree_root.getLeaves() | 327 leaves = tree_root.getLeaves() |
326 record_entry.rel_outputs = [l.path for l in leaves] | 328 record_entry.rel_outputs = [l.path for l in leaves] |
329 record_entry.proc_tree = get_node_name_tree(tree_root) | |
330 if tree_root.getProcessor().is_bypassing_structured_processing: | |
331 record_entry.flags |= FLAG_BYPASSED_STRUCTURED_PROCESSING | |
327 | 332 |
328 force = (pipeline.force or previous_entry is None or | 333 force = (pipeline.force or previous_entry is None or |
329 not previous_entry.was_processed_successfully) | 334 not previous_entry.was_processed_successfully) |
330 if not force: | 335 if not force: |
331 force = re_matchany(rel_path, pipeline.force_patterns) | 336 force = re_matchany(rel_path, pipeline.force_patterns) |