From 20bd6d97977a1f9e21c1d671f8b7385600c9ea39 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 31 Aug 2020 14:28:38 +0800 Subject: [PATCH] DEV: Only eagerload scheduled jobs in a Sidekiq process. --- config/initializers/100-sidekiq.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/100-sidekiq.rb b/config/initializers/100-sidekiq.rb index 6d6e0ddb3a6..dc488ec20bb 100644 --- a/config/initializers/100-sidekiq.rb +++ b/config/initializers/100-sidekiq.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Ensure that scheduled jobs are loaded before mini_scheduler is configured. -if Rails.env == "development" +if Rails.env == "development" && Sidekiq.server? require "jobs/base" Dir.glob("#{Rails.root}/app/jobs/scheduled/*.rb") do |f| load(f)