shu/fix get run for workflow runs (#2362)

This commit is contained in:
Shuchang Zheng
2025-05-16 02:39:47 -07:00
committed by GitHub
parent 09ed1c1dff
commit 87000f5cc3
7 changed files with 28 additions and 28 deletions

View File

@@ -75,7 +75,7 @@ async def get_run_response(run_id: str, organization_id: str | None = None) -> R
modified_at=task_v2.modified_at,
recording_url=workflow_run.recording_url if workflow_run else None,
downloaded_files=workflow_run.downloaded_files if workflow_run else None,
app_url=f"{settings.SKYVERN_APP_URL.rstrip('/')}/{task_v2.workflow_permanent_id}/{task_v2.workflow_run_id}",
app_url=f"{settings.SKYVERN_APP_URL.rstrip('/')}/workflows/{task_v2.workflow_permanent_id}/{task_v2.workflow_run_id}",
run_request=TaskRunRequest(
engine=RunEngine.skyvern_v2,
prompt=task_v2.prompt,

View File

@@ -73,9 +73,7 @@ async def get_workflow_run_response(
workflow_run_id=workflow_run.workflow_run_id,
organization_id=organization_id,
)
app_url = (
f"{settings.SKYVERN_APP_URL.rstrip('/')}/{workflow_run.workflow_permanent_id}/{workflow_run.workflow_run_id}"
)
app_url = f"{settings.SKYVERN_APP_URL.rstrip('/')}/workflows/{workflow_run.workflow_permanent_id}/{workflow_run.workflow_run_id}"
return WorkflowRunResponse(
run_id=workflow_run_id,
run_type=RunType.workflow_run,
@@ -88,12 +86,12 @@ async def get_workflow_run_response(
created_at=workflow_run.created_at,
modified_at=workflow_run.modified_at,
run_request=WorkflowRunRequest(
workflow_id=workflow_run.workflow_id,
workflow_id=workflow_run.workflow_permanent_id,
title=workflow_run_resp.workflow_title,
parameters=workflow_run_resp.parameters,
proxy_location=workflow_run.proxy_location,
webhook_url=workflow_run.webhook_callback_url,
totp_url=workflow_run.totp_verification_url,
webhook_url=workflow_run.webhook_callback_url or None,
totp_url=workflow_run.totp_verification_url or None,
totp_identifier=workflow_run.totp_identifier,
# TODO: add browser session id
),