Skip to content

Commit afaf3d6

Browse files
authored
fix: The workflow cannot function properly after the conversation flow is disconnected (#2428)
1 parent c433c03 commit afaf3d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/application/flow/workflow_manage.py

+2
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ def await_result(self):
382382
break
383383
yield chunk
384384
finally:
385+
while self.is_run():
386+
pass
385387
details = self.get_runtime_details()
386388
message_tokens = sum([row.get('message_tokens') for row in details.values() if
387389
'message_tokens' in row and row.get('message_tokens') is not None])

apps/common/middleware/gzip.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def process_response(self, request, response):
4444
if response.is_async:
4545
# pull to lexical scope to capture fixed reference in case
4646
# streaming_content is set again later.
47-
orignal_iterator = response.streaming_content
47+
original_iterator = response.streaming_content
4848

4949
async def gzip_wrapper():
50-
async for chunk in orignal_iterator:
50+
async for chunk in original_iterator:
5151
yield compress_string(
5252
chunk,
5353
max_random_bytes=self.max_random_bytes,

0 commit comments

Comments
 (0)