Spaces:
Running
Running
| from core.pipeline.step import PipelineStep | |
| class StructureStep(PipelineStep): | |
| name = "structure_service" | |
| def __init__(self, structure_service): | |
| self.service = structure_service | |
| async def run(self, context): | |
| if self.service: | |
| from domain.training.run import Run | |
| for run_item in context.runs: | |
| run_obj = run_item | |
| if isinstance(run_item, dict): | |
| # Convert to Run entity for service compatibility | |
| run_obj = Run(**run_item) | |
| self.service.process_run_for_structure(run_obj, context.runner_profile.runner_id) | |