feat: crud of platform/bots

This commit is contained in:
Junyan Qin
2025-03-27 01:20:00 +08:00
parent 6c1ee922de
commit 5be17c55d2
14 changed files with 188 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ class PipelineService:
return self.ap.persistence_mgr.serialize_model(persistence_pipeline.LegacyPipeline, pipeline)
async def create_pipeline(self, pipeline_data: dict) -> None:
async def create_pipeline(self, pipeline_data: dict) -> str:
pipeline_data['uuid'] = str(uuid.uuid4())
pipeline_data['for_version'] = self.ap.ver_mgr.get_current_version()
pipeline_data['stages'] = stagemgr.stage_order.copy()
@@ -58,6 +58,8 @@ class PipelineService:
)
# TODO: 更新到pipeline manager
return pipeline_data['uuid']
async def update_pipeline(self, pipeline_uuid: str, pipeline_data: dict) -> None:
del pipeline_data['uuid']
del pipeline_data['for_version']