From e6f875d904aad7613766fc4702e996ba9032ef4c Mon Sep 17 00:00:00 2001 From: jasquat Date: Fri, 21 Apr 2023 11:03:53 -0400 Subject: [PATCH] set buffering header to no for interstitial page response. w/ burnettk danfunk --- .../src/spiffworkflow_backend/routes/tasks_controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py index b5dc62070..4adc95364 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py @@ -419,7 +419,11 @@ def _interstitial_stream(process_instance_id: int) -> Generator[str, Optional[st def interstitial(process_instance_id: int) -> Response: """A Server Side Events Stream for watching the execution of engine tasks.""" - return Response(stream_with_context(_interstitial_stream(process_instance_id)), mimetype="text/event-stream") + return Response( + stream_with_context(_interstitial_stream(process_instance_id)), + mimetype="text/event-stream", + headers={'X-Accel-Buffering': 'no'} + ) def _task_submit_shared(