Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit d5dab1f

Browse files
capitancambiomatt-fleming
authored andcommitted
Add timeout hack to mitigate timeouts
1 parent 80abc89 commit d5dab1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/databricks/sql/thrift_backend.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,12 @@ def __init__(
206206
**additional_transport_args, # type: ignore
207207
)
208208

209-
timeout = THRIFT_SOCKET_TIMEOUT or kwargs.get("_socket_timeout", DEFAULT_SOCKET_TIMEOUT)
210209
# setTimeout defaults to 15 minutes and is expected in ms
210+
# HACK!
211+
timeout = THRIFT_SOCKET_TIMEOUT or kwargs.get("_socket_timeout", DEFAULT_SOCKET_TIMEOUT)
212+
logger.info(f"Setting timeout HACK! to {timeout}")
213+
214+
# setTimeout defaults to None (i.e. no timeout), and is expected in ms
211215
self._transport.setTimeout(timeout and (float(timeout) * 1000.0))
212216

213217
self._transport.setCustomHeaders(dict(http_headers))

0 commit comments

Comments
 (0)