Skip to content

Commit

Permalink
Add debug message on graph errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed Jan 3, 2025
1 parent 7126995 commit 9a3f619
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/spellbook/variants/variants_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def get_variants_from_graph(data: Data, single_combo: int | None, job: Job | Non
index = 0
variant_sets: list[tuple[Combo, VariantSet]] = []
for combo in combos:
variant_set = graph.variants(combo.id)
try:
variant_set = graph.variants(combo.id)
except Graph.GraphError as e:
log_into_job(job, f'Error while processing combo {combo.id}:')
raise e
variant_sets.append((combo, variant_set))
if len(variant_set) > 50 or index % log_count == 0 or index == total - 1:
log_into_job(job, f'{index + 1}/{total} combos processed (just processed combo {combo.id})')
Expand Down

0 comments on commit 9a3f619

Please sign in to comment.