pipeline: implement processors property
This commit is contained in:
@@ -152,6 +152,18 @@ class ParallelPipeline(BasePipeline):
|
|||||||
# Frame processor
|
# Frame processor
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@property
|
||||||
|
def processors(self):
|
||||||
|
"""Return the list of sub-processors contained within this processor.
|
||||||
|
|
||||||
|
Only compound processors (e.g. pipelines and parallel pipelines) have
|
||||||
|
sub-processors. Non-compound processors will return an empty list.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The list of sub-processors if this is a compound processor.
|
||||||
|
"""
|
||||||
|
return self._pipelines
|
||||||
|
|
||||||
def processors_with_metrics(self) -> List[FrameProcessor]:
|
def processors_with_metrics(self) -> List[FrameProcessor]:
|
||||||
"""Collect processors that can generate metrics from all parallel branches.
|
"""Collect processors that can generate metrics from all parallel branches.
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,10 @@ class Pipeline(BasePipeline):
|
|||||||
# Frame processor
|
# Frame processor
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@property
|
||||||
|
def processors(self):
|
||||||
|
return self._processors
|
||||||
|
|
||||||
def processors_with_metrics(self):
|
def processors_with_metrics(self):
|
||||||
"""Return processors that can generate metrics.
|
"""Return processors that can generate metrics.
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,18 @@ class SyncParallelPipeline(BasePipeline):
|
|||||||
# Frame processor
|
# Frame processor
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@property
|
||||||
|
def processors(self):
|
||||||
|
"""Return the list of sub-processors contained within this processor.
|
||||||
|
|
||||||
|
Only compound processors (e.g. pipelines and parallel pipelines) have
|
||||||
|
sub-processors. Non-compound processors will return an empty list.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The list of sub-processors if this is a compound processor.
|
||||||
|
"""
|
||||||
|
return self._pipelines
|
||||||
|
|
||||||
def processors_with_metrics(self) -> List[FrameProcessor]:
|
def processors_with_metrics(self) -> List[FrameProcessor]:
|
||||||
"""Collect processors that can generate metrics from all parallel pipelines.
|
"""Collect processors that can generate metrics from all parallel pipelines.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user