Skip to content

Commit

Permalink
Move started_at to be per-mirror-request
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 27, 2024
1 parent eeac6c2 commit ce6da2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/adapters/osu_mirrors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ async def fetch_beatmap_zip_data(beatmapset_id: int) -> bytes | None:
multiple underlying beatmap mirrors to ensure the best possible
availability and performance.
"""
started_at = datetime.now()
prev_mirror: AbstractBeatmapMirror | None = None

await BEATMAP_SELECTOR.update_all_mirror_and_selector_weights()
Expand All @@ -47,6 +46,8 @@ async def fetch_beatmap_zip_data(beatmapset_id: int) -> bytes | None:
# because of an error on a single beatmapset
continue

started_at = datetime.now()

beatmap_zip_data: bytes | None = None
try:
beatmap_zip_data = await mirror.fetch_beatmap_zip_data(beatmapset_id)
Expand Down

0 comments on commit ce6da2c

Please sign in to comment.