mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-04 22:03:49 +00:00
I think I got delayed jobs working
This commit is contained in:
@@ -4,6 +4,11 @@ class Match < ActiveRecord::Base
|
||||
belongs_to :mat, touch: true
|
||||
has_many :wrestlers, :through => :weight
|
||||
|
||||
if Rails.env.production?
|
||||
handle_asynchronously :advance_wrestlers
|
||||
handle_asynchronously :calcSchoolPoints
|
||||
end
|
||||
|
||||
after_update do
|
||||
if self.finished == 1 && self.winner_id != nil
|
||||
if self.w1 && self.w2
|
||||
|
||||
@@ -9,6 +9,10 @@ class Tournament < ActiveRecord::Base
|
||||
has_many :wrestlers, through: :weights
|
||||
has_many :matches, dependent: :destroy
|
||||
|
||||
if Rails.env.production?
|
||||
handle_asynchronously :generateMatchups
|
||||
end
|
||||
|
||||
def resetSchoolScores
|
||||
schools.update_all("score = 0.0")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user