Skip to content

Commit 63f51d9

Browse files
committed
feat: add --api-endpoint and --shutdown-after-inactive-seconds options
1 parent 0c2570f commit 63f51d9

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/smoke.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from rich.table import Table
1111

1212
from wherobots.db import connect, connect_direct
13+
from wherobots.db.constants import DEFAULT_ENDPOINT
1314
from wherobots.db.region import Region
1415
from wherobots.db.runtime import Runtime
1516

@@ -24,7 +25,16 @@
2425
const=logging.DEBUG,
2526
default=logging.INFO,
2627
)
28+
parser.add_argument(
29+
"--api-endpoint",
30+
help="Wherobots API endpoint to request a SQL session from",
31+
default=DEFAULT_ENDPOINT,
32+
)
2733
parser.add_argument("--ws-url", help="Direct URL to connect to")
34+
parser.add_argument(
35+
"--shutdown-after-inactive-seconds",
36+
help="Request a specific SQL Session expiration timeout (in seconds)",
37+
)
2838
parser.add_argument(
2939
"--wide", help="Enable wide output", action="store_const", const=80, default=30
3040
)
@@ -58,11 +68,12 @@
5868
else:
5969
conn_func = functools.partial(
6070
connect,
61-
host="api.staging.wherobots.com",
71+
host=args.api_endpoint,
6272
token=token,
6373
api_key=api_key,
6474
runtime=Runtime.SEDONA,
6575
region=Region.AWS_US_WEST_2,
76+
shutdown_after_inactive_seconds=args.shutdown_after_inactive_seconds,
6677
wait_timeout=900,
6778
)
6879

0 commit comments

Comments
 (0)