DEV: Update engine config to match skeleton
- adds `lib/` autoloading (and removes the plugin.rb workaround) - adds eager loading of scheduled jobs in development (otherwise they don't work at all)
This commit is contained in:
parent
b52d3c7d29
commit
e6bfec5bdb
|
@ -4,5 +4,10 @@ module ::DiscourseAi
|
|||
class Engine < ::Rails::Engine
|
||||
engine_name PLUGIN_NAME
|
||||
isolate_namespace DiscourseAi
|
||||
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(scheduled_job_dir) if Dir.exist?(scheduled_job_dir)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue