1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 05:15:36 +00:00

Removed single weight match generation, fixed bracket names, reload weight matches for pool order, and auto delete errrored jobs

This commit is contained in:
2024-12-16 00:02:30 -05:00
parent 5f049793c8
commit a851436c0c
12 changed files with 69 additions and 45 deletions

View File

@@ -12,6 +12,7 @@ class GenerateTournamentMatches
end
def generate_weight_raw(weight)
@tournament.clear_errored_deferred_jobs
WipeTournamentMatches.new(@tournament).wipeWeightMatches(weight)
@tournament.curently_generating_matches = 1
@tournament.save

View File

@@ -2,14 +2,6 @@ class PoolToBracketMatchGeneration
def initialize( tournament )
@tournament = tournament
end
def generatePoolToBracketMatchesWeight(weight)
PoolGeneration.new(weight).generatePools()
last_match = @tournament.matches.where(weight: weight).order(round: :desc).limit(1).first
highest_round = last_match.round
PoolBracketGeneration.new(weight, highest_round).generateBracketMatches()
setOriginalSeedsToWrestleLastPoolRound(weight)
end
def generatePoolToBracketMatches
@tournament.weights.order(:max).each do |weight|