diff 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
line wrap: on
line diff
--- a/piecrust/processing/base.py	Sun Jan 11 22:58:38 2015 -0800
+++ b/piecrust/processing/base.py	Sun Jan 11 23:01:21 2015 -0800
@@ -9,9 +9,11 @@
 from piecrust.chefutil import format_timed
 from piecrust.processing.records import (
         ProcessorPipelineRecordEntry, TransitionalProcessorPipelineRecord,
-        FLAG_PROCESSED, FLAG_OVERRIDEN)
-from piecrust.processing.tree import (ProcessingTreeBuilder,
-        ProcessingTreeRunner, ProcessingTreeError, STATE_DIRTY, print_node)
+        FLAG_PROCESSED, FLAG_OVERRIDEN, FLAG_BYPASSED_STRUCTURED_PROCESSING)
+from piecrust.processing.tree import (
+        ProcessingTreeBuilder, ProcessingTreeRunner, ProcessingTreeError,
+        STATE_DIRTY,
+        print_node, get_node_name_tree)
 
 
 logger = logging.getLogger(__name__)
@@ -324,6 +326,9 @@
         print_node(tree_root, recursive=True)
         leaves = tree_root.getLeaves()
         record_entry.rel_outputs = [l.path for l in leaves]
+        record_entry.proc_tree = get_node_name_tree(tree_root)
+        if tree_root.getProcessor().is_bypassing_structured_processing:
+            record_entry.flags |= FLAG_BYPASSED_STRUCTURED_PROCESSING
 
         force = (pipeline.force or previous_entry is None or
                  not previous_entry.was_processed_successfully)