add observer cruise to get workflow_run api response (#1470)

This commit is contained in:
Shuchang Zheng
2025-01-02 12:54:18 -08:00
committed by GitHub
parent b9d3228f77
commit c85d5428f3
2 changed files with 10 additions and 1 deletions

View File

@@ -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(