feat: bind pipeline with runtime manager

This commit is contained in:
Junyan Qin
2025-03-28 15:55:03 +08:00
parent 5379e4cf27
commit 7cd03b0243
7 changed files with 119 additions and 10 deletions

View File

@@ -56,7 +56,10 @@ class PipelineService:
await self.ap.persistence_mgr.execute_async(
sqlalchemy.insert(persistence_pipeline.LegacyPipeline).values(**pipeline_data)
)
# TODO: 更新到pipeline manager
pipeline = await self.get_pipeline(pipeline_data['uuid'])
await self.ap.pipeline_mgr.load_pipeline(pipeline)
return pipeline_data['uuid']
@@ -67,10 +70,15 @@ class PipelineService:
await self.ap.persistence_mgr.execute_async(
sqlalchemy.update(persistence_pipeline.LegacyPipeline).where(persistence_pipeline.LegacyPipeline.uuid == pipeline_uuid).values(**pipeline_data)
)
# TODO: 更新到pipeline manager
await self.ap.pipeline_mgr.remove_pipeline(pipeline_uuid)
pipeline = await self.get_pipeline(pipeline_uuid)
await self.ap.pipeline_mgr.load_pipeline(pipeline)
async def delete_pipeline(self, pipeline_uuid: str) -> None:
await self.ap.persistence_mgr.execute_async(
sqlalchemy.delete(persistence_pipeline.LegacyPipeline).where(persistence_pipeline.LegacyPipeline.uuid == pipeline_uuid)
)
# TODO: 更新到pipeline manager
await self.ap.pipeline_mgr.remove_pipeline(pipeline_uuid)