fix: Autoloading during initialization deprecation warning (#5628)
Autoloading during initialization deprecation warning fix fixes: #4012
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
Rails.application.reloader.to_prepare do
|
||||||
# Alfred
|
# Alfred
|
||||||
# Add here as you use it for more features
|
# Add here as you use it for more features
|
||||||
# Used for Round Robin, Conversation Emails & Online Presence
|
# Used for Round Robin, Conversation Emails & Online Presence
|
||||||
@@ -12,3 +13,4 @@ $velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
|||||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||||
Redis::Namespace.new('velma', redis: redis, warning: true)
|
Redis::Namespace.new('velma', redis: redis, warning: true)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ Sidekiq.configure_server do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
# https://github.com/ondrejbartas/sidekiq-cron
|
# https://github.com/ondrejbartas/sidekiq-cron
|
||||||
|
Rails.application.reloader.to_prepare do
|
||||||
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) if File.exist?(schedule_file) && Sidekiq.server?
|
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) if File.exist?(schedule_file) && Sidekiq.server?
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user