MCPcopy Index your code
hub / github.com/e2b-dev/code-interpreter / close

Method close

python/e2b_code_interpreter/main.py:179–185  ·  view source on GitHub ↗

Close all the websocket connections to the kernels. It doesn't shutdown the kernels. :return:

(self)

Source from the content-addressed store, hash-verified

177 return [kernel["id"] for kernel in response.json()]
178
179 def close(self):
180 """
181 Close all the websocket connections to the kernels. It doesn't shutdown the kernels.
182 :return:
183 """
184 for ws in self._connected_kernels.values():
185 ws.close()
186
187 def _connect_to_kernel_ws(self, kernel_id: str) -> None:
188 ws = JupyterKernelWebSocket(

Callers 3

restart_kernelMethod · 0.45
shutdown_kernelMethod · 0.45
benchmarking.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected