File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99DEFAULT_RUNTIME = Runtime .SEDONA
1010DEFAULT_REGION = Region .AWS_US_WEST_2
1111DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS = 300
12+ MAX_MESSAGE_SIZE = 100 * 2 ** 20 # 100MiB
1213
1314
1415class ExecutionState (StrEnum ):
Original file line number Diff line number Diff line change 1414 DEFAULT_REGION ,
1515 DEFAULT_RUNTIME ,
1616 DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS ,
17+ MAX_MESSAGE_SIZE ,
1718)
1819from .errors import (
1920 InterfaceError ,
@@ -116,7 +117,9 @@ def http_to_ws(uri: str) -> str:
116117def connect_direct (uri : str , headers : dict [str , str ] = None ) -> Connection :
117118 logging .info ("Connecting to SQL session at %s ..." , uri )
118119 try :
119- ws = websockets .sync .client .connect (uri = uri , additional_headers = headers )
120+ ws = websockets .sync .client .connect (
121+ uri = uri , additional_headers = headers , max_size = MAX_MESSAGE_SIZE
122+ )
120123 session = Connection (ws )
121124 return session
122125 except Exception as e :
You can’t perform that action at this time.
0 commit comments