frames: StartFrame is now a control frame

This commit is contained in:
Aleix Conchillo Flaqué
2024-07-24 14:42:59 -07:00
parent 5bb64098e7
commit 0fd2fca231
2 changed files with 12 additions and 8 deletions

View File

@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- `StartFrame` is now a control frame similar to `EndFrame`.
### Fixed
- Fixed a `BaseInputTransport` issue that was causing incoming system frames to

View File

@@ -212,14 +212,6 @@ class SystemFrame(Frame):
pass
@dataclass
class StartFrame(SystemFrame):
"""This is the first frame that should be pushed down a pipeline."""
allow_interruptions: bool = False
enable_metrics: bool = False
report_only_initial_ttfb: bool = False
@dataclass
class CancelFrame(SystemFrame):
"""Indicates that a pipeline needs to stop right away."""
@@ -306,6 +298,14 @@ class ControlFrame(Frame):
pass
@dataclass
class StartFrame(ControlFrame):
"""This is the first frame that should be pushed down a pipeline."""
allow_interruptions: bool = False
enable_metrics: bool = False
report_only_initial_ttfb: bool = False
@dataclass
class EndFrame(ControlFrame):
"""Indicates that a pipeline has ended and frame processors and pipelines