fix: Autoloading during initialization deprecation warning (#5628)
Autoloading during initialization deprecation warning fix fixes: #4012
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
# Alfred
|
Rails.application.reloader.to_prepare do
|
||||||
# Add here as you use it for more features
|
# Alfred
|
||||||
# Used for Round Robin, Conversation Emails & Online Presence
|
# Add here as you use it for more features
|
||||||
$alfred = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
# Used for Round Robin, Conversation Emails & Online Presence
|
||||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
$alfred = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
||||||
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||||
end
|
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
||||||
|
end
|
||||||
|
|
||||||
# Velma : Determined protector
|
# Velma : Determined protector
|
||||||
# used in rack attack
|
# used in rack attack
|
||||||
$velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
$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
|
||||||
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) if File.exist?(schedule_file) && Sidekiq.server?
|
Rails.application.reloader.to_prepare do
|
||||||
|
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