File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -347,12 +347,12 @@ def status(self, job_id: str) -> Optional[DGXCloudState]:
347347 r_json = response .json ()
348348 return DGXCloudState (r_json ["phase" ])
349349
350- def _stream_url_sync (self , url : str , queue : queue .Queue ):
350+ def _stream_url_sync (self , url : str , q : queue .Queue ):
351351 """Stream a single URL using requests and put chunks into the queue"""
352352 try :
353353 with requests .get (url , stream = True , verify = False ) as response :
354354 for line in response .iter_lines ():
355- queue .put (line )
355+ q .put (line )
356356 except Exception as e :
357357 logger .error (f"Error streaming URL { url } : { e } " )
358358
@@ -400,9 +400,7 @@ def fetch_logs(
400400 active_urls = set (urls )
401401
402402 # Start threads
403- threads = [
404- threading .Thread (target = self ._stream_url_sync , args = (url , queue )) for url in urls
405- ]
403+ threads = [threading .Thread (target = self ._stream_url_sync , args = (url , q )) for url in urls ]
406404 for t in threads :
407405 t .start ()
408406
You can’t perform that action at this time.
0 commit comments