feat: default pipeline

This commit is contained in:
Junyan Qin
2025-04-16 13:40:59 +08:00
parent a2efb3ee15
commit 8caa6e86a1
8 changed files with 135 additions and 23 deletions
+2 -1
View File
@@ -61,10 +61,11 @@ class PipelineService:
return self.ap.persistence_mgr.serialize_model(persistence_pipeline.LegacyPipeline, pipeline)
async def create_pipeline(self, pipeline_data: dict) -> str:
async def create_pipeline(self, pipeline_data: dict, default: bool = False) -> str:
pipeline_data['uuid'] = str(uuid.uuid4())
pipeline_data['for_version'] = self.ap.ver_mgr.get_current_version()
pipeline_data['stages'] = default_stage_order.copy()
pipeline_data['is_default'] = default
# TODO: 检查pipeline config是否完整