add observer cruise to get workflow_run api response (#1470)
This commit is contained in:
@@ -720,12 +720,19 @@ async def get_workflow_run(
|
||||
current_org: Organization = Depends(org_auth_service.get_current_org),
|
||||
) -> WorkflowRunStatusResponse:
|
||||
analytics.capture("skyvern-oss-agent-workflow-run-get")
|
||||
return await app.WORKFLOW_SERVICE.build_workflow_run_status_response(
|
||||
workflow_run_status_response = await app.WORKFLOW_SERVICE.build_workflow_run_status_response(
|
||||
workflow_permanent_id=workflow_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
organization_id=current_org.organization_id,
|
||||
include_cost=True,
|
||||
)
|
||||
observer_cruise = await app.DATABASE.get_observer_cruise_by_workflow_run_id(
|
||||
workflow_run_id=workflow_run_id,
|
||||
organization_id=current_org.organization_id,
|
||||
)
|
||||
if observer_cruise:
|
||||
workflow_run_status_response.observer_cruise = observer_cruise
|
||||
return workflow_run_status_response
|
||||
|
||||
|
||||
@base_router.get(
|
||||
|
||||
Reference in New Issue
Block a user