diff --git a/apps/api/app/routers/downloads.py b/apps/api/app/routers/downloads.py index 89774097..203a8a0e 100644 --- a/apps/api/app/routers/downloads.py +++ b/apps/api/app/routers/downloads.py @@ -75,14 +75,13 @@ async def status_stream(request: Request, session: Session): # Exclude from OpenAPI schema as there is no support for Server Sent Events. @router.get('/status', include_in_schema=False) -async def get_downloads_status( +def get_downloads_status( request: Request, session_id: str, ) -> EventSourceResponse: session = session_manager.get(session_id) if session is None: raise HTTPException(status_code=status.HTTP_403_FORBIDDEN) - event_source = status_stream(request, session) - return EventSourceResponse(event_source) + return EventSourceResponse(status_stream(request, session)) @router.get('/{download_id}', responses=depends_download_responses) diff --git a/core/ydcore/manager.py b/core/ydcore/manager.py index fcc8190f..360adcf9 100644 --- a/core/ydcore/manager.py +++ b/core/ydcore/manager.py @@ -15,7 +15,7 @@ def __init__( self, output_dir: str, status_hook: StatusHook | None = None, *, - num_threads: int | None = 2, + num_threads: int | None = None, ): self._status_hook = status_hook self._downloads: dict[str, DownloadConfig] = {}