feat: reset all associated session after bot and pipeline modified (#1517)

This commit is contained in:
Junyan Qin (Chin)
2025-06-09 21:50:08 +08:00
committed by GitHub
parent 62f0a938a8
commit 3e707b4b6e
5 changed files with 23 additions and 1 deletions
+5
View File
@@ -112,6 +112,11 @@ class PipelineService:
await self.ap.pipeline_mgr.remove_pipeline(pipeline_uuid)
await self.ap.pipeline_mgr.load_pipeline(pipeline)
# update all conversation that use this pipeline
for session in self.ap.sess_mgr.session_list:
if session.using_conversation is not None and session.using_conversation.pipeline_uuid == pipeline_uuid:
session.using_conversation = None
async def delete_pipeline(self, pipeline_uuid: str) -> None:
await self.ap.persistence_mgr.execute_async(
sqlalchemy.delete(persistence_pipeline.LegacyPipeline).where(