Chatwoot/config/initializers/sidekiq.rb
Sojan Jose 467b45b427
feat: Improved password security policy (#2345)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-07 17:26:08 +05:30

14 lines
406 B
Ruby

require Rails.root.join('lib/redis/config')
schedule_file = 'config/schedule.yml'
Sidekiq.configure_client do |config|
config.redis = Redis::Config.sidekiq
end
Sidekiq.configure_server do |config|
config.redis = Redis::Config.sidekiq
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?