@@ -10,8 +10,8 @@ class Hub:
1010 def __init__ (self , api_key : str , host : str = "https://cocalc.com" ):
1111 self .api_key = api_key
1212 self .host = host
13- # Use longer timeout for API calls (90 seconds instead of default 5) to handle slow operations like Jupyter
14- self .client = httpx .Client (auth = (api_key , "" ), headers = {"Content-Type" : "application/json" }, timeout = 90 .0 )
13+ # Use longer timeout for API calls (120 seconds instead of default 5) to handle slow operations like Jupyter
14+ self .client = httpx .Client (auth = (api_key , "" ), headers = {"Content-Type" : "application/json" }, timeout = 120 .0 )
1515
1616 def call (self , name : str , arguments : list [Any ], timeout : Optional [int ] = None ) -> Any :
1717 """
@@ -334,7 +334,7 @@ def execute(
334334 history : Optional [list [str ]] = None ,
335335 project_id : Optional [str ] = None ,
336336 path : Optional [str ] = None ,
337- timeout : Optional [int ] = 30 ,
337+ timeout : Optional [int ] = 90 ,
338338 ) -> dict [str , Any ]: # type: ignore[empty-body]
339339 """
340340 Execute code using a Jupyter kernel.
@@ -345,7 +345,7 @@ def execute(
345345 history (Optional[list[str]]): Array of previous inputs (they get evaluated every time, but without output being captured).
346346 project_id (Optional[str]): Project in which to run the code -- if not given, global anonymous project is used, if available.
347347 path (Optional[str]): File path context for execution.
348- timeout (Optional[int]): Timeout in SECONDS for the execute call (defaults to 30 seconds).
348+ timeout (Optional[int]): Timeout in SECONDS for the execute call (defaults to 90 seconds).
349349
350350 Returns:
351351 dict[str, Any]: JSON response containing execution results.
0 commit comments