mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-21 04:19:24 +00:00
Upgraded to rails 8.0.2, moved from dalli to solid cache, moved from delayed_job to solid queue, and add solid cable. deploy/rails-dev-run.sh no longer needs to chmod. Fixed finished_at callback for matches. Migrated from Devise to built in rails auth. Added view tests for the bracket page testing that all bout numbers render for all matches in each bracket type.
This commit is contained in:
17
app/jobs/calculate_school_score_job.rb
Normal file
17
app/jobs/calculate_school_score_job.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CalculateSchoolScoreJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
# Class method for direct execution in test environment
|
||||
def self.perform_sync(school)
|
||||
# Execute directly on provided objects
|
||||
school.calculate_score_raw
|
||||
end
|
||||
|
||||
def perform(school)
|
||||
# Log information about the job
|
||||
Rails.logger.info("Calculating score for school ##{school.id} (#{school.name})")
|
||||
|
||||
# Execute the calculation
|
||||
school.calculate_score_raw
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user