removed cancel request

This commit is contained in:
2025-12-30 20:36:02 +01:00
parent 803f35ef39
commit ff9dea0488
5 changed files with 9 additions and 84 deletions

View File

@@ -191,10 +191,6 @@ async def lifespan(_application: FastAPI):
)
if _download_service_instance is not None:
logger.info("Stopping download service...")
await asyncio.wait_for(
_download_service_instance.stop(timeout=min(10.0, remaining_time())),
timeout=min(15.0, remaining_time())
)
logger.info("Download service stopped successfully")
except asyncio.TimeoutError:
logger.warning("Download service shutdown timed out")
@@ -206,7 +202,6 @@ async def lifespan(_application: FastAPI):
progress_service = get_progress_service()
logger.info("Cleaning up progress service...")
# Clear any active progress tracking and subscribers
progress_service._subscribers.clear()
progress_service._active_progress.clear()
logger.info("Progress service cleanup complete")
except Exception as e: # pylint: disable=broad-exception-caught

View File

@@ -72,20 +72,6 @@ class AnimeService:
logger.exception("Failed to subscribe to SeriesApp events")
raise AnimeServiceError("Initialization failed") from e
def request_download_cancel(self) -> None:
"""Request cancellation of any ongoing download.
This method signals the underlying download provider to stop
any active downloads. The cancellation happens asynchronously
via progress hooks in the downloader.
Should be called during shutdown to stop in-progress downloads.
"""
logger.info("Requesting download cancellation via AnimeService")
try:
self._app.request_download_cancel()
except Exception as e:
logger.warning("Failed to request download cancellation: %s", e)
def _on_download_status(self, args) -> None:
"""Handle download status events from SeriesApp.