Processing Progress DTO¶
processing_progress_dto ¶
Processing Progress Data Transfer Object.
Defines the ProcessingProgressDTO, an immutable data transfer object that encapsulates processing progress information. Provides real-time feedback on multi-stage processing operations.
Classes:
| Name | Description |
|---|---|
ProcessingProgressDTO | Immutable DTO containing processing progress information |
Classes¶
ProcessingProgressDTO dataclass ¶
ProcessingProgressDTO(current_stage: str, stage_number: int, total_stages: int, progress_percentage: float, message: str = '', estimated_time_remaining: Optional[float] = None, error: Optional[str] = None)
Deprecated Immutable DTO for processing progress information.
Functions¶
__post_init__ ¶
Validate DTO consistency.
Raises:
| Type | Description |
|---|---|
ValueError | If stage numbers invalid or percentage out of range |
Source code in src/application/dto/processing_progress_dto.py
is_complete ¶
Check if processing is complete.
Returns:
| Type | Description |
|---|---|
bool | True if progress is 100% |
has_error ¶
Check if processing has error.
Returns:
| Type | Description |
|---|---|
bool | True if error exists |
is_final_stage ¶
Check if currently on final stage.
Returns:
| Type | Description |
|---|---|
bool | True if on last stage |