fix weit_for_completion error in sdk (#2381)

This commit is contained in:
Shuchang Zheng
2025-05-18 22:36:24 -07:00
committed by GitHub
parent 226ef99738
commit af60a2b09a
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "skyvern"
version = "0.1.83"
version = "0.1.84"
description = ""
authors = ["Skyvern AI <info@skyvern.com>"]
readme = "README.md"

View File

@@ -24,7 +24,7 @@ from skyvern.forge.sdk.schemas.tasks import CreateTaskResponse, Task, TaskReques
from skyvern.forge.sdk.services.org_auth_token_service import API_KEY_LIFETIME
from skyvern.forge.sdk.workflow.models.workflow import WorkflowRunStatus
from skyvern.library.constants import DEFAULT_AGENT_HEARTBEAT_INTERVAL, DEFAULT_AGENT_TIMEOUT
from skyvern.schemas.runs import CUA_ENGINES, ProxyLocation, RunEngine, RunType
from skyvern.schemas.runs import CUA_ENGINES, ProxyLocation, RunEngine, RunStatus, RunType
from skyvern.services import run_service, task_v1_service, task_v2_service
from skyvern.utils import migrate_db
@@ -401,7 +401,7 @@ class Skyvern(AsyncSkyvern):
async with asyncio.timeout(timeout):
while True:
task_run = await self.agent.get_run(task_run.run_id)
if task_run.status.is_final():
if RunStatus(task_run.status).is_final():
break
await asyncio.sleep(DEFAULT_AGENT_HEARTBEAT_INTERVAL)
return TaskRunResponse.model_validate(task_run.dict())