@@ -275,7 +275,7 @@ async def _probe_worker_video_support(self, worker_url: str) -> bool | None:
275275 except (httpx .RequestError , json .JSONDecodeError ):
276276 return None
277277
278- async def _refresh_worker_video_support (self , worker_url : str ) -> None :
278+ async def refresh_worker_video_support (self , worker_url : str ) -> None :
279279 """Refresh cached video capability for a single worker."""
280280 self .worker_video_support [worker_url ] = await self ._probe_worker_video_support (
281281 worker_url
@@ -335,7 +335,7 @@ def _sanitize_response_headers(headers) -> dict:
335335 }
336336
337337 @staticmethod
338- def _normalize_worker_url (url : str ) -> str :
338+ def normalize_worker_url (url : str ) -> str :
339339 if not isinstance (url , str ):
340340 raise ValueError ("worker_url must be a string" )
341341
@@ -441,7 +441,7 @@ async def update_weights_from_disk(self, request: Request):
441441
442442 def register_worker (self , url : str ) -> None :
443443 """Register a worker URL if not already known."""
444- normalized_url = self ._normalize_worker_url (url )
444+ normalized_url = self .normalize_worker_url (url )
445445 if normalized_url not in self .worker_request_counts :
446446 self .worker_request_counts [normalized_url ] = 0
447447 self .worker_failure_counts [normalized_url ] = 0
@@ -473,11 +473,10 @@ async def add_worker(self, request: Request):
473473 )
474474
475475 try :
476- normalized_url = self ._normalize_worker_url (worker_url )
477- self .register_worker (normalized_url )
476+ self .register_worker (worker_url )
478477 except ValueError as exc :
479478 return JSONResponse (status_code = 400 , content = {"error" : str (exc )})
480- await self ._refresh_worker_video_support ( normalized_url )
479+ await self .refresh_worker_video_support ( worker_url )
481480 return {
482481 "status" : "success" ,
483482 "worker_urls" : list (self .worker_request_counts .keys ()),
0 commit comments