fix: update build_flow_and_stream with event delivery info (#7616)
refactor: Update event delivery mechanism in build_flow_and_stream function Modified the build_flow_and_stream function to utilize the new event delivery type, STREAMING, for improved event handling. The function now returns a response from get_flow_events_response, enhancing the clarity and robustness of the event streaming process. Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
This commit is contained in:
parent
273bd7d339
commit
11ac89adf2
1 changed files with 6 additions and 1 deletions
|
|
@ -548,9 +548,14 @@ async def build_flow_and_stream(flow_id, inputs, background_tasks, current_user)
|
|||
background_tasks=background_tasks,
|
||||
current_user=current_user,
|
||||
queue_service=queue_service,
|
||||
event_delivery=EventDeliveryType.STREAMING,
|
||||
)
|
||||
job_id = build_response["job_id"]
|
||||
return await get_build_events(job_id, queue_service)
|
||||
return await get_flow_events_response(
|
||||
job_id=job_id,
|
||||
queue_service=queue_service,
|
||||
event_delivery=EventDeliveryType.STREAMING,
|
||||
)
|
||||
|
||||
|
||||
@router.post("/build_public_tmp/{flow_id}/flow")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue