mark task v2 timed_out (#2113)
Some checks failed
Run tests and pre-commit / test (push) Failing after 33s
Run tests and pre-commit / fe-lint-build (push) Successful in 1m33s
Publish Fern Docs / run (push) Failing after 46s
Sync to skyvern-cloud / sync (push) Failing after 3s

This commit is contained in:
Shuchang Zheng 2025-04-07 11:54:39 -04:00 committed by GitHub
parent f7ca61c4bd
commit 5145bc8a1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 0 deletions

View file

@ -770,6 +770,18 @@ class WorkflowService:
status=WorkflowRunStatus.canceled,
)
async def mark_workflow_run_as_timed_out(self, workflow_run_id: str, failure_reason: str | None = None) -> None:
LOG.info(
f"Marking workflow run {workflow_run_id} as timed out",
workflow_run_id=workflow_run_id,
workflow_status="timed_out",
)
await app.DATABASE.update_workflow_run(
workflow_run_id=workflow_run_id,
status=WorkflowRunStatus.timed_out,
failure_reason=failure_reason,
)
async def get_workflow_run(self, workflow_run_id: str, organization_id: str | None = None) -> WorkflowRun:
workflow_run = await app.DATABASE.get_workflow_run(
workflow_run_id=workflow_run_id,