Skip to content

Commit

Permalink
Merge pull request #587 from rootstrap/hot_fix_redis_istance
Browse files Browse the repository at this point in the history
Fix redis instance
  • Loading branch information
santib authored Oct 22, 2024
2 parents 44e55d7 + fa40e1b commit c6b5b62
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 6 additions & 2 deletions config/initializers/rails_performance.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
if defined?(RailsPerformance)
RailsPerformance.setup do |config|
config.redis = Redis.new(url: ENV.fetch('REDIS_PERFORMANCE_URL') { 'redis://localhost:6379/1' })
config.redis = Redis.new(
url: ENV.fetch('REDIS_PERFORMANCE_URL') { 'redis://localhost:6379/1' },
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
)
config.duration = 4.hours
config.enabled = true
config.enabled = true

if Rails.env.production?
config.http_basic_authentication_enabled = true
config.http_basic_authentication_user_name = ENV.fetch('PERFORMANCE_USERNAME')
Expand Down
14 changes: 12 additions & 2 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Sidekiq.configure_client do |config|
config.redis = { url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' }, size: 1, network_timeout: 5 }
config.redis = {
url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' },
size: 1,
network_timeout: 5,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
}
end

Sidekiq.configure_server do |config|
config.redis = { url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' }, size: 12, network_timeout: 5 }
config.redis = {
url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' },
size: 12,
network_timeout: 5,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
}
end

Sidekiq::Extensions.enable_delay!
Expand Down

0 comments on commit c6b5b62

Please sign in to comment.