DEV: Only eagerload scheduled jobs in a Sidekiq process.

This commit is contained in:
Guo Xiang Tan 2020-08-31 14:28:38 +08:00
parent 5270cd97ef
commit 20bd6d9797
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20

View File

@ -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)