Make retry handlers static methods

Convert handle_network_failure and handle_download_failure from instance methods to static methods. Hardcode retry params (max_retries, delays) instead of using instance state. Improves testability and removes implicit dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-04 22:29:59 +02:00
parent 2be7b692b9
commit 25dc66fec3
5 changed files with 26 additions and 14 deletions

View File

@@ -163,7 +163,7 @@ def get_series_app() -> SeriesApp:
),
)
_series_app = SeriesApp(anime_dir, db_lookup=_make_db_lookup())
_series_app = SeriesApp(anime_dir)
except Exception as e:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,