Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Dec 30, 2024
1 parent f4ffbd9 commit a29ef53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sdk/src/beta9/abstractions/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,17 @@ def shell(self, timeout: int = 0, url_type: str = ""):
):
return False

# First, spin up the container
# First, spin up the shell container
r = self.parent.shell_stub.create_shell(
CreateShellRequest(
stub_id=self.parent.stub_id,
timeout=timeout,
)
)
print(r)
if not r.ok:
return terminal.error("Failed to create shell ❌")

# Then, we can retrieve the URL and issue a CONNECT request / establish a tunnel
res: GetUrlResponse = self.parent.gateway_stub.get_url(
GetUrlRequest(
stub_id=self.parent.stub_id,
Expand All @@ -635,7 +637,7 @@ def shell(self, timeout: int = 0, url_type: str = ""):
)
)
if not res.ok:
return terminal.error("Failed to get shell connection URL", exit=False)
return terminal.error("Failed to get shell connection URL")

print(res.url)

Expand Down

0 comments on commit a29ef53

Please sign in to comment.