mirror of
https://github.com/discourse/discourse-rewind.git
synced 2025-07-07 22:32:11 +00:00
DEV: Add eager loading for scheduled jobs (#47)
This commit is contained in:
parent
9548e90f45
commit
3cb16660cd
@ -5,5 +5,9 @@ module ::MyPluginModule
|
||||
engine_name PLUGIN_NAME
|
||||
isolate_namespace MyPluginModule
|
||||
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…
x
Reference in New Issue
Block a user