Skip to content

Commit 0c2570f

Browse files
committed
feat: add support for shutdown_after_inactive_seconds
1 parent ac94058 commit 0c2570f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wherobots/db/driver.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def connect(
4646
region: Region = None,
4747
wait_timeout: float = DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
4848
read_timeout: float = DEFAULT_READ_TIMEOUT_SECONDS,
49+
shutdown_after_inactive_seconds: Union[int, None] = None,
4950
results_format: Union[ResultsFormat, None] = None,
5051
data_compression: Union[DataCompression, None] = None,
5152
geometry_representation: Union[GeometryRepresentation, None] = None,
@@ -81,7 +82,10 @@ def connect(
8182
resp = requests.post(
8283
url=f"{host}/sql/session",
8384
params={"region": region.value},
84-
json={"runtimeId": runtime.value},
85+
json={
86+
"runtimeId": runtime.value,
87+
"shutdownAfterInactiveSeconds": shutdown_after_inactive_seconds,
88+
},
8589
headers=headers,
8690
)
8791
resp.raise_for_status()

0 commit comments

Comments
 (0)