diff --git a/app/jobs/submit_results_nag_job.rb b/app/jobs/submit_results_nag_job.rb index f5fa740cbc..d66645b279 100644 --- a/app/jobs/submit_results_nag_job.rb +++ b/app/jobs/submit_results_nag_job.rb @@ -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