Don't load sidekiq workers during initialization
This is to prevent the warning about zeitwerk autoloader
This commit is contained in:
parent
14e27a65ae
commit
2f30b42d93
1 changed files with 3 additions and 1 deletions
|
|
@ -79,5 +79,7 @@ if Sidekiq.server?
|
|||
schedule_file_path = Rails.root.join("config", "schedule.yml")
|
||||
regenerate_config(schedule_file_path) unless valid_config?(schedule_file_path)
|
||||
|
||||
Rails.application.reloader.to_prepare do
|
||||
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file_path)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue