mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(runtime): replace send_request with _send_action_server_request (#6035)
This commit is contained in:
parent
411b63159f
commit
56d7dccec9
@ -114,8 +114,7 @@ class ActionExecutionClient(Runtime):
|
||||
if path is not None:
|
||||
data['path'] = path
|
||||
|
||||
with send_request(
|
||||
self.session,
|
||||
with self._send_action_server_request(
|
||||
'POST',
|
||||
f'{self._get_action_execution_server_host()}/list_files',
|
||||
json=data,
|
||||
@ -132,8 +131,7 @@ class ActionExecutionClient(Runtime):
|
||||
|
||||
try:
|
||||
params = {'path': path}
|
||||
with send_request(
|
||||
self.session,
|
||||
with self._send_action_server_request(
|
||||
'GET',
|
||||
f'{self._get_action_execution_server_host()}/download_files',
|
||||
params=params,
|
||||
@ -198,8 +196,7 @@ class ActionExecutionClient(Runtime):
|
||||
if self.vscode_enabled and self._runtime_initialized:
|
||||
if self._vscode_token is not None: # cached value
|
||||
return self._vscode_token
|
||||
with send_request(
|
||||
self.session,
|
||||
with self._send_action_server_request(
|
||||
'GET',
|
||||
f'{self._get_action_execution_server_host()}/vscode/connection_token',
|
||||
timeout=10,
|
||||
|
||||
@ -20,9 +20,7 @@ from openhands.runtime.impl.action_execution.action_execution_client import (
|
||||
)
|
||||
from openhands.runtime.plugins import PluginRequirement
|
||||
from openhands.runtime.utils.command import get_remote_startup_command
|
||||
from openhands.runtime.utils.request import (
|
||||
send_request,
|
||||
)
|
||||
from openhands.runtime.utils.request import send_request
|
||||
from openhands.runtime.utils.runtime_build import build_runtime_image
|
||||
from openhands.utils.async_utils import call_sync_from_async
|
||||
from openhands.utils.tenacity_stop import stop_if_should_exit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user