Skip to content

Commit

Permalink
DEV: Update chat scheduled job loading to match skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed May 2, 2024
1 parent e949684 commit 3c7cd4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/chat/lib/chat/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class Engine < ::Rails::Engine
engine_name PLUGIN_NAME
isolate_namespace Chat
config.autoload_paths << File.join(config.root, "lib")
scheduled_job_dir = "#{config.root}/app/jobs/scheduled"
config.to_prepare do
Rails.autoloaders.main.eager_load_dir("#{Chat::Engine.config.root}/app/jobs/scheduled")
Rails.autoloaders.main.eager_load_dir(scheduled_job_dir) if Dir.exist?(scheduled_job_dir)
end
end

Expand Down

0 comments on commit 3c7cd4d

Please sign in to comment.