Преглед на файлове

fix: db connections not being released during workflow execution (#3971)

takatost преди 11 месеца
родител
ревизия
b82a2d97ef
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      api/core/app/apps/workflow/generate_task_pipeline.py

+ 2 - 0
api/core/app/apps/workflow/generate_task_pipeline.py

@@ -380,6 +380,8 @@ class WorkflowAppGenerateTaskPipeline(BasedGenerateTaskPipeline, WorkflowCycleMa
                     self._task_state.answer += text
                     yield self._text_chunk_to_stream_response(text)
 
+            db.session.close()
+
     def _is_stream_out_support(self, event: QueueTextChunkEvent) -> bool:
         """
         Is stream out support