File tree Expand file tree Collapse file tree
ert/dark_storage/endpoints Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,10 +266,14 @@ async def start_time(
266266 return Response (str (experiment .start_time_unix ), status_code = 200 )
267267
268268
269- @router .post (f"/{ EverEndpoints .run_path } " , dependencies = authenticated )
270- async def run_path (
269+ @router .post (f"/{ EverEndpoints .runpath } " , dependencies = authenticated )
270+ async def check_runpath (
271271 paths : PathsCheckRequest ,
272272) -> Response :
273+ """
274+ Check if any of the given paths (iteration directories) exists.
275+ Returns a 200 response if at least one path exists, 404 otherwise.
276+ """
273277 exists = False
274278
275279 async with anyio .create_task_group () as tg :
@@ -284,8 +288,8 @@ async def _check_path(path: str) -> None:
284288 tg .start_soon (_check_path , path )
285289
286290 if exists :
287- return Response ("Run path exists" , status_code = 200 )
288- return Response ("Run path does not exist" , status_code = 404 )
291+ return Response ("Runpath exists" , status_code = 200 )
292+ return Response ("Runpath does not exist" , status_code = 404 )
289293
290294
291295@router .websocket (f"/{ EverEndpoints .events } /{{experiment_id}}" )
Original file line number Diff line number Diff line change @@ -34,4 +34,4 @@ class EverEndpoints(StrEnum):
3434 experiments = "experiments"
3535 status = "status"
3636 events = "events"
37- run_path = "run_path "
37+ runpath = "runpath "
You can’t perform that action at this time.
0 commit comments