Skip to content

Commit

Permalink
Fix backward name
Browse files Browse the repository at this point in the history
Signed-off-by: Richo Healey <richo@anyscale.com>
  • Loading branch information
richo-anyscale committed Sep 24, 2024
1 parent 5f6cbce commit 783e182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/ray/dashboard/modules/job/job_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, dashboard_agent):
self._job_manager = None

@routes.post("/api/job_agent/jobs/")
@optional_utils.deny_non_browser_requests()
@optional_utils.deny_browser_requests()
@optional_utils.init_ray_and_catch_exceptions()
async def submit_job(self, req: Request) -> Response:
result = await parse_and_validate_request(req, JobSubmitRequest)
Expand Down Expand Up @@ -73,7 +73,7 @@ async def submit_job(self, req: Request) -> Response:
)

@routes.post("/api/job_agent/jobs/{job_or_submission_id}/stop")
@optional_utils.deny_non_browser_requests()
@optional_utils.deny_browser_requests()
@optional_utils.init_ray_and_catch_exceptions()
async def stop_job(self, req: Request) -> Response:
job_or_submission_id = req.match_info["job_or_submission_id"]
Expand Down
2 changes: 1 addition & 1 deletion python/ray/dashboard/optional_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _update_cache(task):
return _wrapper


def deny_non_browser_requests() -> Callable:
def deny_browser_requests() -> Callable:
"""Reject any requests that appear to be made by a browser"""
def decorator_factory(f: Callable) -> Callable:
@functools.wraps(f)
Expand Down

0 comments on commit 783e182

Please sign in to comment.