mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 13:16:16 +08:00
fix(api): close connection for workflow_paused event
This only affect new connection, not connections which requests state snapshots.
This commit is contained in:
@ -54,7 +54,7 @@ def stream_topic_events(
|
||||
|
||||
def _normalize_terminal_events(terminal_events: Iterable[str | StreamEvent] | None) -> set[str]:
|
||||
if not terminal_events:
|
||||
return {StreamEvent.WORKFLOW_FINISHED.value}
|
||||
return {StreamEvent.WORKFLOW_FINISHED.value, StreamEvent.WORKFLOW_PAUSED.value}
|
||||
values: set[str] = set()
|
||||
for item in terminal_events:
|
||||
if isinstance(item, StreamEvent):
|
||||
|
||||
Reference in New Issue
Block a user