add timeout to browser session request (#2338)

This commit is contained in:
Shuchang Zheng
2025-05-13 16:06:13 -07:00
committed by GitHub
parent 5c29914a20
commit 082f944123
7 changed files with 47 additions and 64 deletions

View File

@@ -16,7 +16,15 @@ class BrowserSessionResponse(BaseModel):
None, description="Type of runnable associated with this session (workflow, task etc)"
)
runnable_id: str | None = Field(None, description="ID of the associated runnable")
created_at: datetime = Field(description="Timestamp when the session was created")
timeout: int | None = Field(
None,
description="Timeout in minutes for the session. Timeout is applied after the session is started.",
)
started_at: datetime | None = Field(None, description="Timestamp when the session was started")
completed_at: datetime | None = Field(None, description="Timestamp when the session was completed")
created_at: datetime = Field(
description="Timestamp when the session was created (the timestamp for the initial request)"
)
modified_at: datetime = Field(description="Timestamp when the session was last modified")
deleted_at: datetime | None = Field(None, description="Timestamp when the session was deleted, if applicable")
@@ -36,6 +44,9 @@ class BrowserSessionResponse(BaseModel):
organization_id=browser_session.organization_id,
runnable_type=browser_session.runnable_type,
runnable_id=browser_session.runnable_id,
timeout=browser_session.timeout_minutes,
started_at=browser_session.started_at,
completed_at=browser_session.completed_at,
created_at=browser_session.created_at,
modified_at=browser_session.modified_at,
deleted_at=browser_session.deleted_at,