Working version of EntrySelector
This commit is contained in:
@@ -156,7 +156,7 @@ class WorkflowEngine:
|
||||
self.global_error = None
|
||||
self.errors = {}
|
||||
self.debug = {}
|
||||
self.item_count = -1
|
||||
self.nb_items = -1
|
||||
|
||||
def add_processor(self, processor: DataProcessor) -> 'WorkflowEngine':
|
||||
"""Add a data processor to the pipeline."""
|
||||
@@ -201,10 +201,10 @@ class WorkflowEngine:
|
||||
if not self.processors:
|
||||
self.has_error = False
|
||||
self.global_error = "No processors in the pipeline"
|
||||
self.item_count = -1
|
||||
self.nb_items = -1
|
||||
raise ValueError(self.global_error)
|
||||
|
||||
self.item_count = 0
|
||||
self.nb_items = 0
|
||||
first_processor = self.processors[0]
|
||||
|
||||
if not isinstance(first_processor, DataProducer):
|
||||
@@ -215,7 +215,7 @@ class WorkflowEngine:
|
||||
self.debug[first_processor.component_id] = {"input": [], "output": []}
|
||||
|
||||
for item_linkage_id, item in enumerate(first_processor.process(None)):
|
||||
self.item_count += 1
|
||||
self.nb_items += 1
|
||||
self.debug[first_processor.component_id]["output"].append(WorkflowPayload(
|
||||
processor_name=first_processor.__class__.__name__,
|
||||
component_id=first_processor.component_id,
|
||||
|
||||
Reference in New Issue
Block a user