rename variable (#2865)

This commit is contained in:
Shuchang Zheng
2025-07-03 02:03:01 -07:00
committed by GitHub
parent 73d6743c87
commit 393387acb0
34 changed files with 118 additions and 126 deletions

View File

@@ -2522,7 +2522,7 @@ class TaskV2Block(Block):
proxy_location=workflow_run.proxy_location,
totp_identifier=self.totp_identifier,
totp_verification_url=self.totp_verification_url,
max_screenshot_scrolling_times=workflow_run.max_screenshot_scrolling_times,
max_screenshot_scrolling_times=workflow_run.max_screenshot_scrolls,
)
await app.DATABASE.update_task_v2(
task_v2.observer_cruise_id, status=TaskV2Status.queued, organization_id=organization_id
@@ -2557,7 +2557,7 @@ class TaskV2Block(Block):
workflow_run_id=workflow_run_id,
run_id=current_run_id,
browser_session_id=browser_session_id,
max_screenshot_scrolling_times=workflow_run.max_screenshot_scrolling_times,
max_screenshot_scrolls=workflow_run.max_screenshot_scrolls,
)
)
result_dict = None

View File

@@ -22,7 +22,7 @@ class WorkflowRequestBody(BaseModel):
totp_verification_url: str | None = None
totp_identifier: str | None = None
browser_session_id: str | None = None
max_screenshot_scrolling_times: int | None = None
max_screenshot_scrolls: int | None = None
extra_http_headers: dict[str, str] | None = None
@field_validator("webhook_callback_url", "totp_verification_url")
@@ -78,7 +78,7 @@ class Workflow(BaseModel):
persist_browser_session: bool = False
model: dict[str, Any] | None = None
status: WorkflowStatus = WorkflowStatus.published
max_screenshot_scrolling_times: int | None = None
max_screenshot_scrolls: int | None = None
extra_http_headers: dict[str, str] | None = None
created_at: datetime
@@ -120,7 +120,7 @@ class WorkflowRun(BaseModel):
failure_reason: str | None = None
parent_workflow_run_id: str | None = None
workflow_title: str | None = None
max_screenshot_scrolling_times: int | None = None
max_screenshot_scrolls: int | None = None
queued_at: datetime | None = None
started_at: datetime | None = None
@@ -169,4 +169,4 @@ class WorkflowRunResponseBase(BaseModel):
task_v2: TaskV2 | None = None
workflow_title: str | None = None
browser_session_id: str | None = None
max_screenshot_scrolling_times: int | None = None
max_screenshot_scrolls: int | None = None

View File

@@ -440,6 +440,6 @@ class WorkflowCreateYAMLRequest(BaseModel):
model: dict[str, Any] | None = None
workflow_definition: WorkflowDefinitionYAML
is_saved_task: bool = False
max_screenshot_scrolling_times: int | None = None
max_screenshot_scrolls: int | None = None
extra_http_headers: dict[str, str] | None = None
status: WorkflowStatus = WorkflowStatus.published

View File

@@ -176,7 +176,7 @@ class WorkflowService:
organization_id=workflow.organization_id,
proxy_location=workflow_request.proxy_location,
webhook_callback_url=workflow_request.webhook_callback_url,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolling_times,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolls,
)
context: skyvern_context.SkyvernContext | None = skyvern_context.current()
current_run_id = context.run_id if context and context.run_id else workflow_run.workflow_run_id
@@ -190,7 +190,7 @@ class WorkflowService:
run_id=current_run_id,
workflow_permanent_id=workflow_run.workflow_permanent_id,
max_steps_override=max_steps_override,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolling_times,
max_screenshot_scrolls=workflow_request.max_screenshot_scrolls,
)
)
@@ -788,7 +788,7 @@ class WorkflowService:
totp_verification_url=workflow_request.totp_verification_url,
totp_identifier=workflow_request.totp_identifier,
parent_workflow_run_id=parent_workflow_run_id,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolling_times,
max_screenshot_scrolling_times=workflow_request.max_screenshot_scrolls,
extra_http_headers=workflow_request.extra_http_headers,
)
@@ -1204,7 +1204,7 @@ class WorkflowService:
total_steps=total_steps,
total_cost=total_cost,
workflow_title=workflow.title,
max_screenshot_scrolling_times=workflow_run.max_screenshot_scrolling_times,
max_screenshot_scrolls=workflow_run.max_screenshot_scrolls,
)
async def clean_up_workflow(
@@ -1478,7 +1478,7 @@ class WorkflowService:
totp_identifier=request.totp_identifier,
persist_browser_session=request.persist_browser_session,
model=request.model,
max_screenshot_scrolling_times=request.max_screenshot_scrolling_times,
max_screenshot_scrolling_times=request.max_screenshot_scrolls,
extra_http_headers=request.extra_http_headers,
workflow_permanent_id=workflow_permanent_id,
version=existing_version + 1,
@@ -1497,7 +1497,7 @@ class WorkflowService:
totp_identifier=request.totp_identifier,
persist_browser_session=request.persist_browser_session,
model=request.model,
max_screenshot_scrolling_times=request.max_screenshot_scrolling_times,
max_screenshot_scrolling_times=request.max_screenshot_scrolls,
extra_http_headers=request.extra_http_headers,
is_saved_task=request.is_saved_task,
status=request.status,
@@ -2114,7 +2114,7 @@ class WorkflowService:
),
proxy_location=proxy_location,
status=status,
max_screenshot_scrolling_times=max_screenshot_scrolling_times,
max_screenshot_scrolls=max_screenshot_scrolling_times,
extra_http_headers=extra_http_headers,
)
return await app.WORKFLOW_SERVICE.create_workflow_from_request(