1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Made the all results page grouping better and fixed the advance wrestler job.

This commit is contained in:
2025-04-17 17:34:34 -04:00
parent ed7186e5ce
commit 44fb5388b4
6 changed files with 33 additions and 13 deletions

View File

@@ -9,6 +9,11 @@ class AdvanceWrestlerJob < ApplicationJob
end
def perform(wrestler, match)
# Add a small delay to increase chance of transaction commit
# without this some matches were getting a deserialization error when running the rake task
# to finish tournaments
sleep(0.5)
# Get tournament from wrestler
tournament = wrestler.tournament
@@ -18,7 +23,7 @@ class AdvanceWrestlerJob < ApplicationJob
tournament: tournament,
job_name: job_name,
status: "Running",
details: "Match ID: #{match&.bout_number || 'No match'}"
details: "Match ID: #{match&.bout_number || 'No match'} Wrestler Name #{wrestler&.name || 'No Wrestler'}"
)
begin