Skip to content

Commit f10eef4

Browse files
committed
Only wait on endpoint in the notebook enviroment
1 parent c63962f commit f10eef4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

singlestoredb/management/manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ def _wait_on_endpoint(
340340
Same object type as `out`
341341
342342
"""
343+
# Only wait if workload type is set which means we are in the
344+
# notebook environment. Outside of the environment, the endpoint
345+
# may not be reachable directly.
346+
if not os.environ.get('SINGLESTOREDB_WORKLOAD_TYPE', ''):
347+
return out
348+
343349
if not hasattr(out, 'connect') or not out.connect:
344350
raise ManagementError(
345351
msg=f'{type(out).__name__} object does not have a valid endpoint',

0 commit comments

Comments
 (0)