pipeline(task): process ErrorFrame in same task and stop pipeline task

This commit is contained in:
Aleix Conchillo Flaqué
2024-08-15 15:22:40 -07:00
parent 66670a2370
commit 981269d594
2 changed files with 24 additions and 10 deletions

View File

@@ -239,7 +239,7 @@ class CancelFrame(SystemFrame):
class ErrorFrame(SystemFrame):
"""This is used notify upstream that an error has occurred downstream the
pipeline."""
error: str | None
error: str
def __str__(self):
return f"{self.name}(error: {self.error})"
@@ -247,9 +247,9 @@ class ErrorFrame(SystemFrame):
@dataclass
class StopTaskFrame(SystemFrame):
"""Indicates that a pipeline task should be stopped. This should inform the
pipeline processors that they should stop pushing frames but that they
should be kept in a running state.
"""Indicates that a pipeline task should be stopped but that the pipeline
processors should be kept in a running state. This is normally queued from
the pipeline task.
"""
pass