Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Align keepalive on client with proxies and envd

Tomas Valentaa4991a25a878
diff --git a/packages/python-sdk/e2b/sandbox/main.py b/packages/python-sdk/e2b/sandbox/main.py
index f8691334c..89a28504f 100644
--- a/packages/python-sdk/e2b/sandbox/main.py
+++ b/packages/python-sdk/e2b/sandbox/main.py
@@ -12,7 +12,7 @@ class SandboxSetup(ABC):
_limits = Limits(
max_keepalive_connections=10,
max_connections=20,
- keepalive_expiry=600,
+ keepalive_expiry=540,
)
envd_port = 49983
diff --git a/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py b/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
index 9f2a54ed9..4a899ed58 100644
--- a/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
+++ b/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
@@ -17,7 +17,6 @@ from e2b.api import handle_api_exception
class SandboxApi(SandboxApiBase):
-
@classmethod
def list(
cls,
@@ -33,7 +32,9 @@ class SandboxApi(SandboxApiBase):
request_timeout=request_timeout,
)
- with ApiClient(config, transport=HTTPTransport(limits=SandboxApiBase._limits)) as api_client:
+ with ApiClient(
+ config, transport=HTTPTransport(limits=SandboxApiBase._limits)
+ ) as api_client:
res = get_sandboxes.sync_detailed(
client=api_client,
)
@@ -79,7 +80,9 @@ class SandboxApi(SandboxApiBase):
if config.debug:
return True
- with ApiClient(config, transport=HTTPTransport(limits=SandboxApiBase._limits)) as api_client:
+ with ApiClient(
+ config, transport=HTTPTransport(limits=SandboxApiBase._limits)
+ ) as api_client:
res = delete_sandboxes_sandbox_id.sync_detailed(
sandbox_id,
client=api_client,
@@ -110,7 +113,9 @@ class SandboxApi(SandboxApiBase):
request_timeout=request_timeout,
)
- with ApiClient(config, transport=HTTPTransport(limits=SandboxApiBase._limits)) as api_client:
+ with ApiClient(
+ config, transport=HTTPTransport(limits=SandboxApiBase._limits)
+ ) as api_client:
res = post_sandboxes_sandbox_id_timeout.sync_detailed(
sandbox_id,
client=api_client,
@@ -139,7 +144,9 @@ class SandboxApi(SandboxApiBase):
request_timeout=request_timeout,
)
- with ApiClient(config, transport=HTTPTransport(limits=SandboxApiBase._limits)) as api_client:
+ with ApiClient(
+ config, transport=HTTPTransport(limits=SandboxApiBase._limits)
+ ) as api_client:
res = post_sandboxes.sync_detailed(
body=NewSandbox(
template_id=template,