Skip to content

Commit

Permalink
Only run SubmitResultsNagJob in Prod
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Nov 1, 2024
1 parent 4405901 commit 96e636d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/jobs/submit_results_nag_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# frozen_string_literal: true

class SubmitResultsNagJob < WcaCronjob
before_enqueue do
# We only need to do this in prod
throw :abort unless EnvConfig.WCA_LIVE_SITE?
end

def nag_needed(competition)
(competition.results_nag_sent_at || competition.end_date) <= 8.days.ago
end
Expand Down

0 comments on commit 96e636d

Please sign in to comment.