Skip to content

Commit

Permalink
fix(remote_runtime): define runtime_id first to fix attrbute error (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww authored Jan 21, 2025
1 parent 8bd7613 commit ff3880c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openhands/runtime/impl/remote/remote_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class RemoteRuntime(ActionExecutionClient):
"""This runtime will connect to a remote oh-runtime-client."""

port: int = 60000 # default port for the remote runtime client
runtime_id: str | None = None
runtime_url: str | None = None
_runtime_initialized: bool = False

def __init__(
self,
Expand Down Expand Up @@ -71,10 +74,7 @@ def __init__(
self.config.sandbox.api_key,
self.session,
)
self.runtime_id: str | None = None
self.runtime_url: str | None = None
self.available_hosts: dict[str, int] = {}
self._runtime_initialized: bool = False

def log(self, level: str, message: str) -> None:
message = f'[runtime session_id={self.sid} runtime_id={self.runtime_id or "unknown"}] {message}'
Expand Down

0 comments on commit ff3880c

Please sign in to comment.