From 5ddadc5d7fbb208e04ee7c1a36cbc6fe15e696c4 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Sat, 13 Jul 2024 20:08:11 -0400 Subject: [PATCH] Remove timeout overrides for mirrors (#18) * Remove timeout overrides for mirrors * undo change --- app/adapters/osu_mirrors/backends/mino.py | 2 -- app/adapters/osu_mirrors/backends/osu_direct.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/adapters/osu_mirrors/backends/mino.py b/app/adapters/osu_mirrors/backends/mino.py index cac9677..807687a 100644 --- a/app/adapters/osu_mirrors/backends/mino.py +++ b/app/adapters/osu_mirrors/backends/mino.py @@ -24,7 +24,6 @@ async def fetch_beatmap_zip_data( response = await self.http_client.get( f"{self.base_url}/d/{beatmapset_id}", headers={"x-ratelimit-key": settings.MINO_INCREASED_RATELIMIT_KEY}, - timeout=httpx.Timeout(None, connect=2), ) if response.status_code in (404, 451): return BeatmapMirrorResponse( @@ -59,7 +58,6 @@ async def fetch_beatmap_background_image( logging.info(f"Fetching beatmap background from mino: {beatmap_id}") response = await self.http_client.get( f"{self.base_url}/preview/background/{beatmap_id}", - timeout=httpx.Timeout(None, connect=2), ) if response.status_code in (404, 451): return BeatmapMirrorResponse( diff --git a/app/adapters/osu_mirrors/backends/osu_direct.py b/app/adapters/osu_mirrors/backends/osu_direct.py index 26ac76e..6655295 100644 --- a/app/adapters/osu_mirrors/backends/osu_direct.py +++ b/app/adapters/osu_mirrors/backends/osu_direct.py @@ -22,7 +22,6 @@ async def fetch_beatmap_zip_data( try: response = await self.http_client.get( f"{self.base_url}/api/d/{beatmapset_id}", - timeout=httpx.Timeout(None, connect=2), ) if response.status_code in (404, 451): return BeatmapMirrorResponse( @@ -56,7 +55,6 @@ async def fetch_beatmap_background_image( try: response = await self.http_client.get( f"{self.base_url}/api/media/background/{beatmap_id}", - timeout=httpx.Timeout(None, connect=2), ) if response.status_code in (404, 451): return BeatmapMirrorResponse(