mirror of
https://github.com/vale981/ray
synced 2025-03-08 11:31:40 -05:00
25 lines
736 B
Python
25 lines
736 B
Python
![]() |
import logging
|
||
|
|
||
|
import aiohttp.web
|
||
|
|
||
|
import ray.new_dashboard.utils as dashboard_utils
|
||
|
import ray.new_dashboard.modules.test.test_utils as test_utils
|
||
|
|
||
|
logger = logging.getLogger(__name__)
|
||
|
routes = dashboard_utils.ClassMethodRouteTable
|
||
|
|
||
|
|
||
|
class HeadAgent(dashboard_utils.DashboardAgentModule):
|
||
|
def __init__(self, dashboard_agent):
|
||
|
super().__init__(dashboard_agent)
|
||
|
|
||
|
@routes.get("/test/http_get_from_agent")
|
||
|
async def get_url(self, req) -> aiohttp.web.Response:
|
||
|
url = req.query.get("url")
|
||
|
result = await test_utils.http_get(self._dashboard_agent.http_session,
|
||
|
url)
|
||
|
return aiohttp.web.json_response(result)
|
||
|
|
||
|
async def run(self, server):
|
||
|
pass
|