fix: Autoloading during initialization deprecation warning (#5628)
Autoloading during initialization deprecation warning fix fixes: #4012
This commit is contained in:
parent
6cfd594d85
commit
86ca7f4a8d
2 changed files with 17 additions and 13 deletions
|
@ -1,14 +1,16 @@
|
|||
# Alfred
|
||||
# Add here as you use it for more features
|
||||
# Used for Round Robin, Conversation Emails & Online Presence
|
||||
$alfred = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
||||
end
|
||||
Rails.application.reloader.to_prepare do
|
||||
# Alfred
|
||||
# Add here as you use it for more features
|
||||
# Used for Round Robin, Conversation Emails & Online Presence
|
||||
$alfred = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
||||
end
|
||||
|
||||
# Velma : Determined protector
|
||||
# used in rack attack
|
||||
$velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('velma', redis: redis, warning: true)
|
||||
# Velma : Determined protector
|
||||
# used in rack attack
|
||||
$velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('velma', redis: redis, warning: true)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,4 +12,6 @@ Sidekiq.configure_server do |config|
|
|||
end
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue