Skip to content

Commit

Permalink
Report errors in recalculate command
Browse files Browse the repository at this point in the history
  • Loading branch information
Syriiin committed May 29, 2024
1 parent dcd952f commit a054234
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions profiles/management/commands/recalculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.db.models import Count, QuerySet
from tqdm import tqdm

from common.error_reporter import ErrorReporter
from common.osu.difficultycalculator import (
AbstractDifficultyCalculator,
CalculationException,
Expand Down Expand Up @@ -265,6 +266,7 @@ def recalculate_beatmaps_v2(
try:
update_difficulty_calculations(page, difficulty_calculator)
except CalculationException as e:
ErrorReporter().report_error(e)
pbar.write(
self.style.ERROR(
f"Error calculating difficulty values for beatmaps: {e}"
Expand Down Expand Up @@ -355,6 +357,7 @@ def recalculate_scores_v2(
difficulty_calculator,
)
except CalculationException as e:
ErrorReporter().report_error(e)
pbar.write(
self.style.ERROR(
f"Error calculating performance values for beatmap {unique_beatmap['beatmap_id']} with mods {unique_beatmap['mods']}: {e}"
Expand Down

0 comments on commit a054234

Please sign in to comment.