From 488ab85653a2df4b5fd048493d58ebaaf611327c Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 12 Feb 2023 19:05:05 +0100 Subject: [PATCH] Adjust autoloading --- config/application.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/application.rb b/config/application.rb index e832eb9e..a92cf4cb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -27,12 +27,14 @@ module Justask # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - config.load_defaults 6.0 + config.load_defaults 7.0 # add `lib/` to the autoload paths so zeitwerk can find e.g. our `UseCase`s # without an explicit `require`, and also take care of hot reloading the code # (really useful in development!) - config.autoload_paths << config.root.join("lib") + config.autoload_once_paths << config.root.join("lib") config.eager_load_paths << config.root.join("lib") + # This lowers memory usage from Bootsnap + config.add_autoload_paths_to_load_path = false # Use Sidekiq for background jobs config.active_job.queue_adapter = :sidekiq